PDA

View Full Version : help with parsing a form


swrzzzz
10-07-2007, 04:53 PM
Hi

I am writing a quite complex form for a new VBA module. When I submit, I need to parse the contents of the form and tell the user if things are missing etc.

Can I leave the form on screen after a submit and print up an error message so I dont have to go through all the code to generate a new output of the form with the values typed so far?

I am confusing myself between the url variables, display data and database data which is different and I am thinking there must be an established pattern for this that I could follow.

I can make it work but it just looks nasty and complex.

Can anyone point me to some reading please?

Steve

Lynne
10-07-2007, 05:43 PM
Yes, you can. I have a form that does just that. When the form gets submitted, I read the $POST['variable_name'] ($post_variable=$POST['variable_name'] ) and it gets thrown back into my form in the template (<input type="text" name="myname" size="50" value="$variable_name">)

Sorry I can't point you to some reading, I do everything by trial and error. :)