Hiya i was wondering if some one could please have a look at this code and tell me why its not inserting into the database.. cuz i can't see why its not and its not giving me any errors and is running as you would expect expect actually putting the data into the database
thanks peter
<head>
<title>Untitled</title>
</head>
<body>
<?
if ($submit){
$db = mysql_connect("localhost","root","password");
mysql_select_db("rentdb",$db);
$rs = mysql_query("INSERT INTO app (name,company,address,state,post,phone,fax,email) VALUES ('$name','$company','$address','$state','$post','$phone',$fax','$email')");
$result = mysql_query($rs);
echo "Thank you for your applicaion, you will receive an email from us soon";
} else {
?>
<form method="post" action="" >
<input type="hidden" name="id" value=http://www.phpbuilder.com/board/archive/index.php/"<?=$id?>">
Name: <input type="text" name="name" value="<? echo $myrow["name"] ?>"><br>
Company: <input type="text" name="company" value="<? echo $myrow["company"] ?>"><br>
Address: <input type="text" name="address" size="35" value="<? echo $myrow["address"]?> "><br>
State: <input type="text" name="state" value="<? echo $myrow["state"] ?>"><br>
Post Code: <input type="text" name="post" size="4" value="<? echo $myrow["post"] ?>"><br>
Phone: <input type="text" name="phone" size="10" maxlength="9" value="<? echo $myrow["phone"]?>"><br>
Fax: <input type="text" name="fax" value="<? echo $myrow["fax"]?>"><br>
Email: <input type="text" name="email" value="<? echo $myrow["email"]?>"><br>
<input type="submit" name="submit" value="Submit">
<input type="reset" name="submit2" value="Clear"><br>
<?
}
?>
</body>
thanks peter
<head>
<title>Untitled</title>
</head>
<body>
<?
if ($submit){
$db = mysql_connect("localhost","root","password");
mysql_select_db("rentdb",$db);
$rs = mysql_query("INSERT INTO app (name,company,address,state,post,phone,fax,email) VALUES ('$name','$company','$address','$state','$post','$phone',$fax','$email')");
$result = mysql_query($rs);
echo "Thank you for your applicaion, you will receive an email from us soon";
} else {
?>
<form method="post" action="" >
<input type="hidden" name="id" value=http://www.phpbuilder.com/board/archive/index.php/"<?=$id?>">
Name: <input type="text" name="name" value="<? echo $myrow["name"] ?>"><br>
Company: <input type="text" name="company" value="<? echo $myrow["company"] ?>"><br>
Address: <input type="text" name="address" size="35" value="<? echo $myrow["address"]?> "><br>
State: <input type="text" name="state" value="<? echo $myrow["state"] ?>"><br>
Post Code: <input type="text" name="post" size="4" value="<? echo $myrow["post"] ?>"><br>
Phone: <input type="text" name="phone" size="10" maxlength="9" value="<? echo $myrow["phone"]?>"><br>
Fax: <input type="text" name="fax" value="<? echo $myrow["fax"]?>"><br>
Email: <input type="text" name="email" value="<? echo $myrow["email"]?>"><br>
<input type="submit" name="submit" value="Submit">
<input type="reset" name="submit2" value="Clear"><br>
<?
}
?>
</body>