im using this code.
$sql = mysql_query("UPDATE contacts SET Name='$Name',
Phone='$Phone',
Email='$Email',
Address='$Address',
City='$City',
State='$State',
Zip='$Zip' WHERE id=$id");
it won't modify any records like this.
when i take out the "where id=$id' statement, it will modify, but it modifys ALL records.
$sql = mysql_query("UPDATE contacts SET Name='$Name',
Phone='$Phone',
Email='$Email',
Address='$Address',
City='$City',
State='$State',
Zip='$Zip'");
well, when i got here i decided that i might as well put all the code up.
<?php
$id=$_GET['id'];
$db = mysql_connect("xx", "xxxxxx","xxxxxx");
mysql_select_db("xx",$db);
if($submit == submit) {
$sql = mysql_query("UPDATE contacts SET
Name='$Name',
Phone='$Phone',
Email='$Email',
Address='$Address',
City='$City',
State='$State',
Zip='$Zip' WHERE id=$id");
$result = mysql_query($sql);
}
?>
<form method="post" action="<?php echo $PHP_SELF?>">
Name:<input type="Text" name="Name"><br>
Phone:<input type="Text" name="Phone"><br>
Email:<input type="text" name="Email"><br>
Address:<input type="Text" name="Address"><br>
City:<input type="Text" name="City"><br>
State:<input type="Text" name="State"><br>
Zip:<input type="Text" name="Zip"><br>
<input type="Submit" name="submit" value="submit">
</form>
</body>
</html>