Cannot select database!!??????
Posted by: computer_girl (---.wp.shawcable.net)
Date: July 03, 2009 10:12PM

I get this when trying to select database:

Parse error: parse error in C:\wamp\www\try.php on line 8

I use the code:



<?php
$username = "root";
$password = "";
$hostname = "localhost";

//connection to the databse
$connection = mysql_connect($hostname,$username,$password)
$db = mysql_select_db("test", $connection)

?>


I don't know what is wrong? Please help!!!!!!!!!!!!!!!!

Options: ReplyQuote
Re: Cannot select database!!??????
Posted by: Mchl (---.neoplus.adsl.tpnet.pl)
Date: July 03, 2009 11:53PM

You're missing ; at the end of last two lines

Options: ReplyQuote
Re: Cannot select database!!??????
Posted by: yfastud (Moderator)
Date: July 04, 2009 12:57AM

and did you already create db before trying to connect? if not, follow this
[blog.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.