Jump to content
xisto Community

ewcreators

Members
  • Content Count

    60
  • Joined

  • Last visited

Everything posted by ewcreators

  1. There were a few good movies that weren't in the top ten, and a few bad movies that were in the top 10. You have to think about the fact that most kids who can afford it went to Spiderman 3, it is a classic, plus tons of moms and little kids went to Shrek 3 and Rattouille. I was suprised that Oceans 13 and Superbad weren't in there, but I guess they didn't make the cut with all the other good films in the top 10.
  2. I enjoy watching Hockey. It is fast, there is a lot of action, and there is an ocasional fight to spice things up a bit. It is not a high score game, but almost every moment is exciting, between the cool shots, the hard checks, and the risky plays. I also like waching soccer, but not as much as I like to watch hockey.And the Strongest man contests are pretty sweet too :XD:
  3. I was just reading a book called Fear Nothing by Dean Koontz. Christopher Snow is the main chaacter in this novel. Not only did his parents die under mysteriously, but he's also being followed by shady characters who want him to stop trying to find out how they died--or else they'll kill off his remaining loved ones (his really smart dog Orson; his best freind Bobby; and his girlfriend Sasha). And as if being followed in his own hometown, Moonlight Bay, California, isn't bad enough, Chris has to outrun his followers without ever leaving town. He has xeroderma pigmentosum, or as he calls it XP, a rare genetic abnormality that forces him to avoid light. Cumulative exposure to sun, bright lights, and the like will give him skin cancer eventually, and he doesn't dare leave his home when he has dealt with XP for over 28 years. All in all this is a great book and I would recomend it to ANY adults (there are some slightly graphic parts, but kids could probebly read it too.)
  4. Hmm... if you wan't a great computer, Alienware is the best to go. I have an Alienware notebook, the Aurora mALX, and it is simply amazing. If you want to check out the Aurora mALX, the link is: http://www.alienware.com/main.aspx Alienware is also really cool because you can customise a lot of aspects in the notebooks they make. If you don't want Alienware though, HP (Hewlett Packard) also has a lot of great notebooks at a wide price range.
  5. Hi all, Its Aldo. anyways, I wont be using the method of pagination, i will just tell you how to make a basic online now script. When someone logs in, now take into consideration that the name of the username input is username (<input type.... name=username) First ,create a table in your database saying online now and add 2 fields to it. id and username id type=integer(INT) , auto increment, length =255and username = VARCHAR length=the limit a username should be in your site now from there we take off : <?php//logged.php//authentication script//connection script//if connection success $insert=mysql_query("INSERT into onlinenow (name) VALUES ('$_GET[username]')")or die(mysql_error());header('location:game.php');//if authentication or connection fails, redirect them to an error page.?>-----<?php//game.php//suppose you have a box display game data//in that box, you want to show NUMBER of people online$onlinecount=mysql_query("SELECT * from onlinenow");$ocount=mysql_num_rows($onlinecount);echo "Number of users online now: ".$ocount." ";?>------<?php//onlinenow.php//i wont be dividing results into different pagesecho "<table border=1><tr><th colspan=3>ONLINE NOW</th></tr>";echo "<tr><td>ID</td><td>NAME</td><td>OPTIONS</td></tr>";$oselect=mysql_query("SELECT * from onlinenow");while($online=mysql_fetch_array($oselect)) {echo "<tr><td>".$online['id']."</td><td>".$online['username']."</td>";echo "<td><a href='profile.php?a=$_SESSION[username]&s=$s&profile=$online[name]'>Visit Profile</a></td></tr>";}echo "</table>";?>----- if it doesn work or if you have suggestions, or opinions,,,please go ahead and edit :XD: Notice from rvalkass: Added closing code tag.
  6. We will now discuss rand(). rand, is used for randomizing numbers within it. <?php$random=rand(1,10);echo $random;?>You will get a number between one and ten. It is useful for creating fun guessing games. It is also useful for attack scripts in online games, ive used it like this rand($levelofuser1,$skillpointsofuser1) * 3and for the person being attacked: rand($levelofuser2,$skillpointsofuser2)* 3 here is a small guessing game script: //form.php<?php$rand=rand(1,10);//that randomizes the number from 1 to 10..afcourse,,you can always change it to 1-100 or 20 -22..etcif ($_POST['randnumber'] = $rand) {echo "<font color='green'><b>Correctly Guessed!</b></font>";} else {echo "Guess Again! The correct answer was ".$rand."";}?><form action='#' method='post'>Guess a random number from one to ten :<br><input type='text' name='randnumber'><br><input type='submit' value='submit number' name='rbutton'></form> Have fun!
  7. Not sure if its useful but anyways,Its better to use redirect/ header('location:...'); rather than keeping the code on the same page.Even if the user has a connection problem its better to be a little more safe the sorry.
  8. Let's Talk about basic mysql commands used in php. I will now show you a list of the most common MySQL FUNCTIONS : The first thing to always do before combining php/mysql is to connect to the mysql database and the main mysql connection , But instead of writing it again and again on each page, heres what i did /am doing for my current game : <?php//connection.php$connection=mysql_connect("mysql server name","username","password");$db=mysql_select_db("mysql database name",$connection);?> <?php//list.phprequire('connection.php');//listing command here?> the require("file.fileextension."); is a command used to include other files into that page you are using. Pretty useful and helpful rather than writing the code over and over again. the require() command automatically puts all the data of the required file into the main page and all other pages it is used in. BASIC MYSQL COMMANDS: To executed a command, you have to use mysql_query() . but i suggest storing it in a variable because that is the recordset id used in most of the mysql functions. Select syntax: SELECT * FROM table_name WHERE criteria (example : name='Aldo' or name='$_GET[name]') ORDER BY ... LIMIT .... Mostly we dont use order by or limit, that will be used later on in another tutorial. we will also use 2 new commands: the while () command and a mysql function : mysql_fetch_arrays(r.id); for now, we won't use while() as it is a bit confusing and we will use the WHERE command in SELECT so that we wont have to use while right now. DETAILS FOR THIS CODE: database=anything table name=users fields in mysql table `users` : -name -age -email <?phprequire('connection.php');$select_mysql_results=mysql_query("SELECT * from `users` WHERE name='Aldo'")or die(mysql_error());$result=mysql_fetch_array($select_mysql_results);echo "Name : ".$result['name']." <br />";echo "Age : ".$result['age']."<br />";echo "email : ".$result['email']." ";?>That displays all the data for the name "Aldo" in the database table "users"You may have noticed that i put `` for users.well because sometimes in phpmyadmin or in webhosts, there are tables already used so you have to put `` so that it doesnt get confused and blow the script.the or die();command is used to stop the script if the select command doesnt work.mysql_fetch_array(); gets the required data from the table in the database.UPDATING and DELETING will be included in the next tutorial.Now we do INSERTING values.details:same table.different fields:Name and password[code]//form.php<form action='done.php' method='post'>Name:<input type='text' name='fname'><br>Password:<input type='password' name='fpass'><br></form>---------------------------//done.php<?phprequire('connection.php');$insert=mysql_query("INSERT into `users` (name,password) VALUES ('$_POST[fname]','$_POST[fpass]')");header('location:success.php');?>-----//success.php<?phpecho "Congratulations, you have been registered as a user!";?>---- Now in the insert command, firstly we tell it where (which table) to insert , and then we list what all we want to insert(there may be some fields in the table that you dont what to insert into) thus (name,password) . now we tell it what to insert with the values() command in mysql: VALUE ('$_POST[thenamegiventoitintheform]','$_POST[namegivenintheform]') but remember, when doing values, you have to insert it in the order you gave for what you want to insert, like in the code i type name first and pass second. so you have to type in values the $_POST for name first then password second. Just thought id explain the header() command to those who dont know it. Usually, when we put the insert command and then the echo command to tlel someone it has been done, they can easily, press refresh and the information will be sent again, post or get. so i have been using header to first insert the values then redirect to a page that says success. SYNTAX: header('location:file.php'); Hope this clears up some doubts atleast if not all. Any questions, post here and ill be happy to help :XD:
  9. Well...notepad is the no 1 choice.Crimson editor is also pretty good. Its kinda like an interpretor.And for web templates,Use Photoshop
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.