
I am attempting to follow a tutorial for php & mysql using a form to insert data into a table and can't figure out what to use in place of localhost as it doesn't seem to work. I have used "homeserver.domainname", homeserver@domainname", "domainname" and can't seem to make this work.
This is the php script I am using:
$first=$_POST['first'];
$last=$_POST['last'];
$phone=$_POST['phone'];
$mobile=$_POST['mobile'];
$fax=$_POST['fax'];
$email=$_POST['email'];
$web=$_POST['web'];
mysql_connect(homeserver.johnjchisholm.ca,$username,$password);
@mysql_select_db($database) or die( ;Unable to select database;);
$query = ;INSERT INTO contact VALUES ('','$first','$last','$phone','$mobile','$fax','$email','$web');;
mysql_query($query);
?>
Any suggestions as to where I am going wrong. The db is named contacts and the table name is contact. Thanks for any help you can offer this newbie.