Functions
| From: | Chris Payne | Date: | Tue, 03 Feb 2004 00:36:04 +0000 |
| Subject: | Functions | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-32762@lists.php.net to get a copy of this message | ||
Hi there everyone,
I need to write a function (New to them but starting to get the hang of it) that will take the field
from a form and then do operations on it (To remove bad characters, any entered mysql commands etc
....) now that's not a problem, what I want to do though is write a generic function that will
handle ALL the fields in any form.
For example, if I have 3 input boxes, name, address, email - I would like the function to recieve
the data from each form string and do the operation and then send the info back keeping the same
name and value that it arrived in. I'm finding it hard to explain, but basically if a field is
called email and it's value is me@me.com then the function needs to be able to automatically
pickup that the incoming name is email and it's value it me@me.com then process it and output
it again, and i'm confused how to do it.
I can do it if I specify the name of the form item coming in and going out, but since I want to make
it generic I don't want a zillion different possible form names in the function :-)
Any help (If you can understand my rambling :-) would be greatly appreciated.
Regards
Chris