I was wondering if the name of a submitted form is kept in GET or POST or REQUEST. If not, is there any way other than javascript to do find out which form was submitted without checking the form's structure against some kind of pattern.
Thanks,
h
find name of form
Moderator: General Moderators
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
you could do
then just get the form name from $_GET['f']
if you put that on all your forms you will be supra solid
edit: alternativly you could do a input type=hidden kinda deal with the form name in each form, which might be quite a bit better
Code: Select all
<form name="coolba" action="script.php?f=coolba" method="post">if you put that on all your forms you will be supra solid
edit: alternativly you could do a input type=hidden kinda deal with the form name in each form, which might be quite a bit better
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm
You would be better off using a hidden input tag for that.
You can change the value to a php variable so it can be changed. Then just check $_POST['form_name_check'] to see what form it was.
Another way would be to do something like this...
Code: Select all
<input type="hidden" name="form_name_check" value="my form name">Another way would be to do something like this...