|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
passing the name of a form
I am writing my own generic form processor and it is all going well but i am stuck on how to get the name of the form that is being processed by my script.
Anyone got any ideas? cheers toby |
|
#2
|
|||
|
|||
|
You send the form name in a hidden field...
__________________
~ Joe Penn We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set? Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you. |
|
#3
|
|||
|
|||
|
I didn't want to do that as i was using $_post to create the SQL insert statements and extra posted variables kept messing them up.
I wanted to use the form name as the name of the table that the form data would go into. what i have done is passed the form name as a hidden field and the used unset() to destroy it before being used for the SQL. |
|
#4
|
|||
|
|||
|
Just curious,
How does the form name being in $_POST get in the way of your SQL statement? I mean, don't you have to call each element in $_POST by name anyway? |
|
#5
|
|||
|
|||
|
PHP Code:
I use the above statement to generate the INSERT statement. So if anything is posted that can't be inserted the statement fails. The if statement filters out the submit value and i was getting into trouble adding extra conditional statements |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > passing the name of a form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|