Page 1 of 1

need help with some code.

Posted: Wed Sep 10, 2008 3:46 pm
by yours31f
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: Posting Code in the Forums to learn how to do it too.


I have been studying php for about a week now, and so i decided to try to code a site. well I have about 3 pages of code written up, and on the first page i already hit an error. well please read through and see if you can help me out...

Code: Select all

 
<?PHP
$con = mysql_connect("*****","*****","******");
if (!$con){
echo ('Could Not Connect: ' . mysql_ERROR());
}
$test = mysql_query("SELECT * FROM users WHERE username='********' ");
while($row = MYSQL_FETCH_ARRAY($test)){
echo $row['username'];
}
echo "complete";
?>

~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: Posting Code in the Forums to learn how to do it too.

Re: need help with some code.

Posted: Wed Sep 10, 2008 4:16 pm
by onion2k
Missing a " from the beginning of CREATE DATABASE users"