paulman888888
Members-
Posts
332 -
Joined
-
Last visited
Never
Everything posted by paulman888888
-
hi, Below is uploadscore.php <?php // Insert a row of information into the table "example" mysql_query("INSERT INTO example (name, score) VALUES('" . mysql_real_escape_string($_GET['name']) . "', '" . mysql_real_escape_string($_GET['score']) . "')") or die('Theres an error. Please try again.#'); echo "Score Uploaded!#"; ?> What i would like is a 'You are...' to tell my users which place they came. But i don't know how to order my database to tell me that information. Please Help Paul
-
would it get the highest ten or any random ten?
-
can that vistor come back and get another hit. eg i go to the site (1 hit) and go away and come back again (do you want another hit?)
-
hi, I have a little problem. Can you help me show only 10 scores please? <?php // Get all the data from the "example" table $result = mysql_query("SELECT * FROM example ORDER BY score DESC") or die('O no. Theres an error#'); echo ""; echo ""; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo ""; echo $row['score']; echo "#"; } echo "#Completed"; ?> I know it shows a # but i want that their because my game interpates it as a newline. Thankyou Paul
-
Ill try something else. Thankyou all the same
-
Answer to your question YES
-
i am looking for a php script that will show mySql results in a simple file. For example, i use firefox and i click on souce code. When i click on it i would like to see something like this, (result1.php) someonesname tony jimmy bobby tony again and-so-on (result2.php) 10000 5500 333 33 this will be shown in an applitcation and it will show a list of names (result1.php) and next to it scores (result2.php). So it will read someonesname 10000 I think the main problem is getting the name and score to stay with each other on different pages if you know what i mean. Thankyou for the help.
-
Am not sure that is what am looking for. This is my code and it outs html. I would like it to out simple text. Each row on a new line. <?php // Get all the data from the "example" table $result = mysql_query("SELECT * FROM example ORDER BY score DESC") or die('O no. Theres an error'); echo "<table border='1'>"; echo "<tr> <th>Name</th> <th>Score</th> </tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo "<tr><td>"; echo $row['name']; echo "</td><td>"; echo $row['score']; echo "</td></tr>"; } echo "</table>"; ?> Thankyou for all the help
-
Is there a simple way of outputing a simple file (eg when you look at the souce code all you see is simple text)? Or do i have to receate a new php script.
-
I would like to add another colum. But my atemps failed. i would like to add ID This is my code for name and score <?php // Get all the data from the "example" table $result = mysql_query("SELECT * FROM example ORDER BY score DESC") or die('O no. Theres an error'); echo "<table border='1'>"; echo "<tr> <th>Name</th> <th>Score</th> </tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo "<tr><td>"; echo $row['name']; echo "</td><td>"; echo $row['score']; echo "</td></tr>"; } echo "</table>"; ?>
-
thankyou it works fine
-
my code wont work. It worked with the DESC, but i want it in descending order. This is my code <?php // Get all the data from the "example" table $result = mysql_query("SELECT * FROM example ORDER BY DESC score") or die('Theres an error'); echo "<table border='1'>"; echo "<tr> <th>Name</th> <th>Score</th> </tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo "<tr><td>"; echo $row['name']; echo "</td><td>"; echo $row['score']; echo "</td></tr>"; } echo "</table>"; ?> please help Thankyou
-
Please can you check the code. I always do something wrong but never spot it. <?php mysql_query("DELETE FROM example WHERE id=$_GET[id]"); ?> Thankyou
-
THankyou very much.
-
cant you use a normal upload script form with a hidden form as well. 1st part -- upload script 2nd part -- e-mail script Hope that helps
-
How do i make it safer then?
-
<?php // Make a MySQL Connection mysql_connect("localhost", "admin", "1admin") or die(mysql_error()); mysql_select_db("test") or die('Theres an error.'); // Get all the data from the "example" table $result = mysql_query("SELECT * FROM example") or die('Theres an error.'); echo "<table border='1'>"; echo "<tr> <th>Name</th> <th>Score</th> </tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo "<tr><td>"; echo $row['name']; echo "</td><td>"; echo $row['score']; echo "</td></tr>"; } echo "</table>"; ?> This is the code i am useing. I would like it to be arrached so that the highest score is at the top and lowest score is at the bottom. How could I do that? Please help. Thankyou
-
please can you check my code for errors. <?php mysql_connect("popcorn.com", "something", "its tony") or die(mysql_error()); echo "Connected to MySQL<br />"; mysql_select_db("pauhut5_db2") or die('Theres an error. Please try again.'); echo "Connected to Database"; // Insert a row of information into the table "example" mysql_query("INSERT INTO example (name, score) VALUES('$_GET[name]', '$_GET[score]' ) ") or die('Theres an error. Please try again.'); echo "Score Uploaded!"; ?>
-
Am not good with MySQL. How do i get $_GET[name] $_GET[score] and the date saved in MySQL. When i try makeing the table in PHPmyAdmin theres loads of options for row types. Which ones do i need for what? Thankyou for the help PAul
-
I like th idea. This is what it is? <form name="form1" method="post" action="comfirm.php"> Do i have to change my form?
-
Hi. I have made a form thats submits via Post. The problem is that i have a comfirm page but how do i get the post data to go to the next page? Page1 ---- Page 2 ---- Page3 Form ----- Comfirm ---- The action scipts -Ok -------- Ok ------- Stuck trying to get the data from the page and second to this page. How do i make the data from the first page go to the second and the thrid? Thankyou.
-
Need help with tracking page and redirects
paulman888888 replied to voasi's topic in PHP Coding Help
can you explain it in more detail please. -
it doesn't work! I tested it and the file size is 0. for some reason its not adding my data.
-
this may sound silly but what is curl? I like to learn and would like to know a website that i can read to find out more. Can you help please?
-
My code is this <?php $filename = "games/{$_POST["name"]}.php"; if (file_exists($filename)) { echo "<p>Theres an error, the name of your game already exists.<br />Go back and change the name of the game.<br /><a href='javascript: history.go(-1)'>Or Click Here</a></p>"; } else { $ourFileName = "games/{$_POST["name"]}.php"; $ourFileHandle = fopen($ourFileName, 'w') or die("Can't make file"); fclose($ourFileHandle); $myFile = "games/{$_POST["name"]}.php"; $fh = fopen($myFile, 'w') or die("There's an error!"); $stringData = "{$_POST["main"]}"; fwrite($fh, $stringData); fclose($fh); echo "GAME CREATED SUSCESS FULL"; } ?> the create file part works but the stringData part doesn't I don't know why the StringData isn't adding the post data information the post data is something like this <i>This is an example and i hope it helps</i> Please help me fix the post data. thankyou