Ok, I've got the form part working, it passes two variables to a .php page.
The .php page queries a database and returns some values, based upon what was input in the form.
I then need to take some of the values from the record and some of the values from the form and perform an UPDATE.
So, from the form:
$usrInputName
$usrInputSearch
The SELECT query (which works) is:
PHP Code:
$result = mysql_query("SELECT * FROM tblMyTable WHERE requiredfield = '$usrInputSearch'",$link);
I can then "echo" all of the fields from the one returned record so that they output in the browser.
What I now need to do is take the usrInputName value and append it to the end of what is currently in one of the fields returned by the SELECT statement.
So, I'm doing this:
PHP Code:
mysql_query("UPDATE tblMyTable SET TheFieldToAmend = $row[TheFieldToAmend] . '<BR>' . $usrInputName WHERE id = $row[id] LIMIT 1");
So:
If TheFieldToAmend = This
And $usrInputName = Raistlin
I want the value of TheFieldToAmend for the selected record (identified by $row[id] returned by the SELECT query) to be:
This<BR>Raistlin