PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
$host="localhost" ;
$user="membershipsite" ;
$password="password" ;
$connection = mysql_connect($host,$user,$password)
or die ("Couldn't connect to server.");
$db = mysql_select_db("membership",$connection)
or die ("Couldn't select database.");
$query= "SELECT * FROM client";
$result= mysql_query($query)
or die ("Couldn't execute query.");
?>
But it says Couldn't execute query. Is there something I have done wrong somewhere?
<?php
$host="localhost" ;
$user="membershipsite" ;
$password="password" ;
$connection = mysql_connect($host,$user,$password)
or die ("Couldn't connect to server.");
$db = mysql_select_db("membership",$connection)
or die ("Couldn't select database.");
$query= "SELECT * FROM client";
$result= mysql_query($query)
or die ("Couldn't execute query.");
?>
But it says Couldn't execute query. Is there something I have done wrong somewhere?
Thanks for the help! I did figure it out, it appears that the table being called Client with a capital C makes a big difference as I wrote it with a lowercase C.