WampServer
Apache, PHP, MySQL on Windows
Home forum
Back to WampServer
presentation
Downloads
Addons
Trainings
Alter Way
Go to Topic:
Previous
•
Next
Go to:
Forum List
•
Message List
•
New Topic
•
Search
•
Log In
•
Print View
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:
Reply
•
Quote
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:
Reply
•
Quote
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:
Reply
•
Quote
Go to:
Forum List
•
Message List
•
Search
•
Log In
Sorry, only registered users may post in this forum.
Click here to login