matthew9090
-
Posts
135 -
Joined
-
Last visited
Never
Posts posted by matthew9090
-
-
problem solved!!!!
i used a different script of the internet
-
it still says the same thing
-
i added the ; at the end of the line but it still says the same thing
-
i got this code from w3schools.com and just changed the values. can someone please show me the code with the correct syntax.
-
i have added the line now it says:
Parse error: syntax error, unexpected T_WHILE, expecting ',' or ';' in (location) on line 15
-
Help i don't under stand why this doen't work
it says:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in (file location) on line 14
This is the script:
<?php $con = mysql_connect("localhost","usr","Pass"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("db_name", $con); $result = mysql_query("SELECT * FROM tablename"); while($row = mysql_fetch_array($result)) { echo $row['row'] . " " . $row['email']; echo "<br />"; } mysql_close($con); ?>
while($row = mysql_fetch_array($result)) is line 14
mysql_fetch_array error
in PHP Coding Help
Posted
i used this example of the internet first:
Then i used this one: