i want to establish a connection with the MySql database.
here is my code
<?php
$mysql_link = mysql_connect('localhost', 'root', 'root');
mysql_select_db('mysql') or die('Could not select database');
$images_dir = 'photos';
?>
whats wrong
establishe a connection with the MySql database
Moderator: General Moderators
Re: establishe a connection with the MySql database
Can you please try some other database name instead of mysql. Also have you created username and password "root" on localhost.
If possible let me know what error you are getting.
If possible let me know what error you are getting.
Re: establishe a connection with the MySql database
i am just trying to create a php photo galley using mysql.
for this purpose i am trying to follow the steps that's are given in the following link.
http://www.sitepoint.com/article/php-ga ... m-minutes/
is any one have the simple tutorial to make a php picture gallery with only few pictures.
for this purpose i am trying to follow the steps that's are given in the following link.
http://www.sitepoint.com/article/php-ga ... m-minutes/
is any one have the simple tutorial to make a php picture gallery with only few pictures.