LifeinAsia

msg:4263713 | 5:30 pm on Feb 7, 2011 (gmt 0) |
You'll need an AND in there (between the `basic` = and `school` = parts).
|
rocknbil

msg:4263717 | 5:36 pm on Feb 7, 2011 (gmt 0) |
It would be simpler to do it programmatically. $basic=($basic=='english')?$basic:''; // or better yet, case insensitive // $basic=(preg_match('/english/i',$basic))?$basic:''; $sqlQuery = "UPDATE `members` SET `basic` = '$basic', `school` = '$school' WHERE `member_id` = ".$_SESSION['SESS_MEMBER_ID']; Note that concatenation is not needed with $scalar_variables.
|
LifeinAsia

msg:4263820 | 7:48 pm on Feb 7, 2011 (gmt 0) |
(And ignore my previous message- didn't have enough coffee in my yet and I mis-read the statement...)
|
JuicyScript

msg:4263928 | 9:45 pm on Feb 7, 2011 (gmt 0) |
hello rocknbil i knw this section is not php but what i what to do is to compare the variable with the field name and if they match it is inserted in the database else nothing is inserted $basic=($basic=='english')?$basic:''; // or better yet, case insensitive // $basic=(preg_match('/english/i',$basic))?$basic:''; $sqlQuery = "UPDATE `members` SET `basic` = '$basic', `school` = '$school' WHERE `member_id` = ".$_SESSION['SESS_MEMBER_ID'];
|
rocknbil

msg:4264231 | 5:01 pm on Feb 8, 2011 (gmt 0) |
See your post in PHP - I *think* I got what you wanted there. :-)
|
|