# include file include ("test_holding_inc.php"); $name=(urldecode($name));
$error=false; if ( $name == "" ) { $error=true; echo "Name needs to be filled in<BR>"; } if ( $address == "" ) { echo "Address needs to be filled in<BR>"; $error=true; }
if ( $town == "" ) { echo "Town needs to be filled in<BR>"; $error=true; } if ($error) { echo "All fields have to be filled in, re-select the record"; echo "<BR><A HREF=\"per_amend.php\"> Back</A>"; exit; } $sql="UPDATE personal SET name='$name', address='$address', town='$town', country='$country' WHERE ID='$ID'";
if (!mysql_query($sql,$connection)) { echo "Error cannot Amend record<BR>"; echo "<BR><A HREF=\"per_amend.php\"> Back</A>"; exit; } else { # amend OK inform user echo "Table updated [".mysql_affected_rows()."] record amended<BR>"; echo "The record of <B>$name</B> has been amended"; }
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.