I have been uing the following code to retrieve url variables and add the data to a database but ive spent for every trying to get it to update and just cant. I have seen how dw Mx does it with forms but cant apply this to my own code, if any one could help that would be fantatic!
<?
//---------- Connects to the server and selects the database
$dbh=mysql_connect ("localhost", "example", "example")
or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("example");
//---------- Inserts Create Case Details into Project table
$CaseNumber = addslashes($CaseNumber);
$NHS_Number = addslashes($NHS_Number);
$AssessDate = addslashes($AssessDate);
$ReviewDate = addslashes($ReviewDate);
$NameOfProf = addslashes($NameOfProf);
$SummaryDate = addslashes($SummaryDate);
$User_ID = addslashes($User_ID);
$NameOfProf = addslashes($NameOfProf);
$query = "insert into CaseDetails values ('".$CaseNumber."','".$NHS_Number."','".$User_ID."',,'".$NameOfProf."''".$AssessDate."','".$ReviewDate."','".$NameOfProf."','".$SummaryDate."')";
$result = mysql_query($query);
if($result)
{
echo "<br>";
echo mysql_affected_rows()." Case has successfully been added to the database.";
}
?>
basically I want to apply the [MM_update] action to this sorting the data by the [CaseNumber] .
Thank you to any one wh replies