MySQL Forums
Forum List  »  PHP

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

I have wrote this code:

<?php

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

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

exit('<p>Unable to locate the' .
'database at this time.</p>');
}
else
{
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?

Thanks..

Options: ReplyQuote


Subject
Written By
Posted
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.