combine field contents on submission - syntax issue
Posted: Mon Aug 15, 2011 4:07 pm
when i submit a form, i want to check to see if a particular condition is present, then i want to have another field in the DB filled in with the contents of more than one field.
if i use only one field (instrument1 is the field i want populated), then everything works great, but when i add a second field (or third/fourth etc ... as the case requires) i either get some strange extraneous characters in instrument1, or, in the example below it only posts the contents of lsrc
how can i combine fields so they both successfully input to (in the above example) instrument1?
if i use only one field (instrument1 is the field i want populated), then everything works great, but when i add a second field (or third/fourth etc ... as the case requires) i either get some strange extraneous characters in instrument1, or, in the example below it only posts the contents of lsrc
Code: Select all
$lsrc = mysql_real_escape_string($_POST['lsrc']);
if ($lsrc == "HOME") {
$instrument1 = $lsrc AND $b_fname;
} else {
$instrument1 = $b_fname;
}