need help with some code.

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
yours31f
Forum Newbie
Posts: 1
Joined: Wed Sep 10, 2008 3:43 pm

need help with some code.

Post 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.
Last edited by yours31f on Wed Sep 10, 2008 4:29 pm, edited 2 times in total.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: need help with some code.

Post by onion2k »

Missing a " from the beginning of CREATE DATABASE users"
Post Reply