Jump to content


Photo

If statement problems


  • Please log in to reply
2 replies to this topic

#1 bach

bach
  • Members
  • PipPip
  • Member
  • 16 posts

Posted 21 May 2006 - 11:55 AM

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

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();
}


#2 annihilate

annihilate
  • Members
  • PipPipPip
  • Advanced Member
  • 63 posts
  • LocationUK

Posted 21 May 2006 - 12:06 PM

Try getting rid of the $ infront of mysql_select_db
Personal site: NewEnigma  |  Java and JSF Discussion

#3 bach

bach
  • Members
  • PipPip
  • Member
  • 16 posts

Posted 21 May 2006 - 12:16 PM

[!--quoteo(post=375747:date=May 21 2006, 01:06 PM:name=annihilate)--][div class=\'quotetop\']QUOTE(annihilate @ May 21 2006, 01:06 PM) View Post[/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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users