Very Basic Help
Posted: Tue Feb 03, 2009 12:15 pm
Im learning, very slowly, and trying to put something VERY basic together, that won't seem to work.
I have written:
But it says Couldn't execute query. Is there something I have done wrong somewhere?
Thanks.
I have written:
Code: Select all
<?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.");
?>Thanks.