paulman888888
Members-
Posts
332 -
Joined
-
Last visited
Never
Everything posted by paulman888888
-
[SOLVED] forum issue or maybe php issue ??
paulman888888 replied to runnerjp's topic in PHP Coding Help
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 -
thankyou everyone
-
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
-
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.
-
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
-
sorry that makes no sence. Please explain more
-
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.
-
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
-
[SOLVED] Why wont it create the table?
paulman888888 replied to paulman888888's topic in PHP Coding Help
i was opening the wrong file in my browser. Silly me. thankyou all the same -
[SOLVED] Why wont it create the table?
paulman888888 replied to paulman888888's topic in PHP Coding Help
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 -
[SOLVED] Why wont it create the table?
paulman888888 replied to paulman888888's topic in PHP Coding Help
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()); -
I would say go with JAVASCRIPT. I don't know any scripts my self but GOOGLE it.
-
[SOLVED] Why wont it create the table?
paulman888888 replied to paulman888888's topic in PHP Coding Help
sorry you lost me. Mine worked but then when i added gameid it diddn't work. Can you explain what i did wrong please. -
[SOLVED] Cookies ok for passwords?
paulman888888 replied to MichaelMackey's topic in PHP Coding Help
try this site http://www.tizag.com/phpT/phpsessions.php it uses sessions which are simply to cookies but safer -
<?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
-
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.
-
how do you make an mysql data only show results with the number 1 in gameid column? thankyou
-
<?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 ?>
-
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.
-
am i adding this to the code or replaceing it?
-
sessions or hidden forms.
-
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?
-
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
-
whats a CPM website? And i think your posting this is the wrong forums.
-
have a look at this. http://gscripts.net/free-php-scripts/RSS_Scripts.html it might help you. Its easy then makeing your script