Jump to content

paulman888888

Members
  • Posts

    332
  • Joined

  • Last visited

    Never

Everything posted by paulman888888

  1. how many problems do you have? You ask so many questions and i think you should stop getting the Amazing people a php freaks to make your forum. There here to help not make a whole system for you
  2. nice idea this this script is going to viewed on a apaliction. Is there a way of just not saveing the rest of the charerters after 14
  3. if $_get(where) = ('') then echo // page not found else echo //blah i know its not in php form that because i don't understand the brackets stuff.
  4. This is my script and i would like to limit how long the name can be, i would like the maxium name lengh to be 14. <?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!#"; ?> Thankyou
  5. sorry that makes no sence. Please explain more
  6. Explain more please and put your code in tags. You seem to be buliding your own forum system but why can't you use already made ones.
  7. nothings easy but if you have dreamweaver it comes with built in spary (the thing you want to do) and its also good with php and mysql
  8. i was opening the wrong file in my browser. Silly me. thankyou all the same
  9. nope not working this is my full code what is wrong with it? <?php mysql_connect("ffffff.com", "dsf_sdf", "sdfsdfs") or die(mysql_error()); echo "Connected to MySQL<br />"; mysql_select_db("sdfsdfs") or die(mysql_error()); echo "Connected to Database"; // Create a MySQL table in the selected database mysql_query("CREATE TABLE myscorev1(id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(30), score INT, gameid INT)") or die(mysql_error()); echo "Table Created!"; echo "Install Completed"; ?> please help
  10. nope same error. mysql_query("CREATE TABLE myscorev1(id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(30), score INT, gameid INT);") or die(mysql_error());
  11. I would say go with JAVASCRIPT. I don't know any scripts my self but GOOGLE it.
  12. sorry you lost me. Mine worked but then when i added gameid it diddn't work. Can you explain what i did wrong please.
  13. try this site http://www.tizag.com/phpT/phpsessions.php it uses sessions which are simply to cookies but safer
  14. <?php mysql_connect("something.com", "ddddd", "sssssss") or die(mysql_error()); echo "Connected to MySQL<br />"; mysql_select_db("ddddd") or die(mysql_error()); echo "Connected to Database"; // Create a MySQL table in the selected database mysql_query("CREATE TABLE myscorev1( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(30), score INT), gameid INT)") or die(mysql_error()); echo "Table Created!"; echo "Install Completed"; ?> Why wont it make the table it comes up with this error, Connected to MySQL Connected to DatabaseYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' Gameid INT)' at line 5
  15. I would like a script that when loaded shows the highest id i got this of Madtechic, WHERE GameID = 1 so i thought if i change it i would get, WHERE MAX id echo id But i can't put it into proper PHP script.
  16. how do you make an mysql data only show results with the number 1 in gameid column? thankyou
  17. <?php //chanhe domainname to the form data you want $url = echo $_POST['domainname']; $url_info = parse_url($url); echo $url_info['scheme'], '://', $url_info['host']; // Getting form data ?>
  18. I have all my pages set up but i would like it so that it would only show a certain game scores. What i have at the minute is a web-page that handles all scores but does not say which game sent it. So the hi scores are kind of pointless. What i thought i could do was add a gameid. So my script could look at the gameid and store it, and when i would like to look at highscores i could type something.php?gameid=1 and it will show me everything for that game. Below are my current scripts. Please can you help me change them. uploadscore.php <?php require('connect.php'); ?> <?php mysql_query("INSERT INTO myscorev1 (name, score) VALUES('" . mysql_real_escape_string($_GET['name']) . "', '" . mysql_real_escape_string($_GET['score']) . "')") or die('Theres an error. Please try again.#'); mysql_query("SELECT count(name) as position FROM myscorev1 WHERE score > ".mysql_real_escape_string($_GET['score'])) or die('Theres an error. Please try again.#'); $row = mysql_fetch_assoc($result); $position = $row['position']+1; echo "Score Uploaded# Your Position was ".$row['position']."#"; ?> viewalldata.php <?php require('connect.php'); ?> <?php mysql_query("INSERT INTO myscorev1 (name, score) VALUES('" . mysql_real_escape_string($_GET['name']) . "', '" . mysql_real_escape_string($_GET['score']) . "')") or die('Theres an error. Please try again.#'); mysql_query("SELECT count(name) as position FROM myscorev1 WHERE score > ".mysql_real_escape_string($_GET['score'])) or die('Theres an error. Please try again.#'); $row = mysql_fetch_assoc($result); $position = $row['position']+1; echo "Score Uploaded# Your Position was ".$row['position']."#"; ?> viewscores.php <?php require('connect.php'); ?> <?php // Get all the data from the "myscorev1" table $result = mysql_query("SELECT * FROM myscorev1 ORDER BY score DESC LIMIT 0, 10") 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"; ?> viewnames.php <?php require('connect.php'); ?> <?php // Get all the data from the "myscorev1" table $result = mysql_query("SELECT * FROM myscorev1 ORDER BY score DESC LIMIT 0, 10") 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['name']; echo "#"; } echo "#Completed"; ?> viewall.php <?php require('connect.php'); ?> <?php // Get all the data from the "myscorev1" table $result = mysql_query("SELECT * FROM myscorev1 ORDER BY score DESC") or die('O no. Theres an error'); echo "<table border='1' width='20%'>"; 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>"; ?> Thank-you all very much.
  19. am i adding this to the code or replaceing it?
  20. sessions or hidden forms.
  21. as in what place they got in the score list. i have got in my table id - name - score and when the score has been submited i want it to show what place they got (NOT THERE ID). How would i do that?
  22. Does anyone know how i could get this code to tell you where you came? Eg after score has been submited it will tell you what place you came? <?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!#"; ?> Thankyou
  23. whats a CPM website? And i think your posting this is the wrong forums.
  24. have a look at this. http://gscripts.net/free-php-scripts/RSS_Scripts.html it might help you. Its easy then makeing your script
×
×
  • Create New...

Important Information

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.