ok i have two files, one which is the form to insert the data and the script file that is suposed to insert the data. I can't seem to get it to work. I know for sure that the tabel in the database is set fine and has all the right permisions.
if you could help me out
this is the form page:
<html>
<head>
<title>My PHP Test</title>
<?php $db = mysql_connect ("localhost", "username", "pass");
mysql_select_db ("tiroka_uk_db", $db);
?>
<body>
<form method=post action="script.php">
First: <input type=text name="first1"><br>
Last: <input type=text name="last1"><br>
Birth: <input type=text name="birth1"><br>
Address: <input type=text name="add1"><br>
City: <input type=tesxt name="city1"><br>
State: <input type=text name="state1"><br>
Zip: <input type=text name="zip1"><br>
Home: <input type=text name="home1"><br>
Cell: <input type=text name="cell1"><br>
<input type=submit value="Submit">
</form>
</body>
</html>
and the script file is as follows:
<?php
$con = mysql_connect("localhost", "username", "pass") or die("Could not connect to server");
$db = mysql_select_db("databasename", $con) or die("Could not select database");
$sql = "INSERT INTO phone (id,first,last,birth,add,city,state,zip,home,cell) VALUES (' ','$first1','$last1','$birth1,'$add1','$city','$state1','$zip1','$home1','$cell1')";
mysql_query($sql, $con) or die("Could not execute query");
?>
all i ever get is my die message saying it could not execute the query. I know it connects just fine and selects the database just fine as well. If anyone sees something wrong (other then the fact that i have a connect running to the database in the form page, i know don't need, i just have not taken it out)
Thanks, Tiroka