Jump to content

If statement problems


bach

Recommended Posts

Can you help I have got an if statement which is got an error

Error
Fatal error: Call to undefined function: () in sam/db.php on line 22

[code]
if(!$connection = mysql_pconnect($host, $username, $password))
{
  $message = mysql_error();
  echo $message."<br />";
  die();
}
line 22 - elseif (!$mysql_select_db($database, $connection))
{
  $message = mysql_error();
  echo $message."<br />";
  die();
}[/code]
Link to comment
https://forums.phpfreaks.com/topic/10117-if-statement-problems/
Share on other sites

[!--quoteo(post=375747:date=May 21 2006, 01:06 PM:name=annihilate)--][div class=\'quotetop\']QUOTE(annihilate @ May 21 2006, 01:06 PM) [snapback]375747[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Try getting rid of the $ infront of mysql_select_db
[/quote]

Thanks for your reply,

I can't believe i missed it cheers
Link to comment
https://forums.phpfreaks.com/topic/10117-if-statement-problems/#findComment-37668
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.