hi guys
can some one give me an idea how to do the following
three form fields.
if 1 or 2 of the form fields have a value use this sql update statment
if all 3 have a value use this sql update statment
------------
would i be right in collecting form content into an array and counting array
**using mysql as backend**
form validation then update sql
Moderator: General Moderators
-
AXEmonster
- Forum Commoner
- Posts: 34
- Joined: Fri Sep 05, 2003 11:27 am
- Location: newcastle UK
Luckily, the form content is already in an array - either $_POST or $_GET. Just counting that array would be the easiest way I can think of. The only difficulty I can think of is that if the form variables are used in the query, you may not be certain which ones are filled in. You're still going to have to do checks against specific form values.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.