MySQL Forums
Forum List  »  PHP

Problem with DB connection
Posted by: Yaniv Kri
Date: June 16, 2005 04:11AM

I have wrote this code:


$link = @mysql_connect('localhost', 'root', '');
if (!$link) {
die('Could not connect: ' . mysql_error());
echo 'Connected successfully';

if (!@mysql_select_db('tik_tak')) {

exit('<p>Unable to locate the' .
'database at this time.</p>');
echo 'db matsa behazlaha<br>';


I know it works, but nothing displaying on the page just a clean blank, nothing.. even no string "Connected successfully'"

What I have to do?


Options: ReplyQuote

Written By
Problem with DB connection
June 16, 2005 04:11AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.