New to Mysql connection
Posted: Mon Dec 08, 2008 2:07 pm
~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:
Posting Code in the Forums to learn how to do it too.
Hi,
I am new to PHP&Mysql.
I have just installed mysql 5 and php 5.2.6
phpinfo() works fine, and I have created a simple mysql-connection php file as:
the user, password and db name are correct.
I have some problems here.
first of all, it just runs to the connection command without showing any error messages. however it ignores anything appearing after the connection command, e.g. here showing the 'done!' message. so by browsing to this page, the result is a blank page!
Secondly in IE sometimes it gives me HTTP 500 internal error, while another time it runs without any change. This is not the case in Firefox.
Would anyone please help me to get started?
Very thankful!
~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:
Posting Code in the Forums to learn how to do it too.
Hi,
I am new to PHP&Mysql.
I have just installed mysql 5 and php 5.2.6
phpinfo() works fine, and I have created a simple mysql-connection php file as:
Code: Select all
<?php
define('DB_USER', 'lottt');
define('DB_PASSWORD', 'lottt');
define('DB_HOST', 'localhost');
define('DB_NAME', 'lottt');
$dbc = @mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die('Could not connect to MYSQL: ' . mysql_error());
@mysql_select_db(DB_NAME) or die('Could not select the database: ' . mysql_error());
echo 'done!';
?>I have some problems here.
first of all, it just runs to the connection command without showing any error messages. however it ignores anything appearing after the connection command, e.g. here showing the 'done!' message. so by browsing to this page, the result is a blank page!
Secondly in IE sometimes it gives me HTTP 500 internal error, while another time it runs without any change. This is not the case in Firefox.
Would anyone please help me to get started?
Very thankful!
~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: