Re: [PHP] form handling

2011-08-12 Thread Ashley Sheridan
Chris Stinemetz chrisstinem...@gmail.com wrote: I would bet it's the quotes screwing up the js. Can / are you escaping that variable when ajaxing it back? Bastien Koert 905-904-0334 I found a way to make the ajax work with one form. I removed the table and the ajax worked just fine.

Re: [PHP] form handling

2011-08-12 Thread jean-baptiste verrey
it's (pretty) easy to send two forms at once with jquery nowadays, you just get all the input of the 2 forms and post them! function submit2Forms(form1DomId,form2DomId){ $datas={}; $(form1DomId).find(':input').each(function(){ if(($(this).attr('name')

Re: [PHP] form handling

2011-08-11 Thread Stuart Dallas
On 11 Aug 2011, at 19:25, Chris Stinemetz wrote: I have two forms on the same php script. Is it possible to submit both forms to the same action=processform.php with a single submit button? If so would you give me examples on how to handle this? Three options spring to mind... 1) Combine

Re: [PHP] form handling

2011-08-11 Thread Ken Robinson
At 02:25 PM 8/11/2011, Chris Stinemetz wrote: I have two forms on the same php script. Is it possible to submit both forms to the same action=processform.php with a single submit button? If you want to submit at the same time, why do you have two forms? Ken -- PHP General Mailing List

Re: [PHP] form handling

2011-08-11 Thread Chris Stinemetz
If the two forms call the same script that's fine.  If not, that will work too.  Just realize that the inputs from one form will NOT be returned to the script when the submit is used from the other form. Jim, This is what I am trying to do. One submit button for both forms going to the same

Re: [PHP] form handling

2011-08-11 Thread Jim Giner
I'm thinking that Chris means that he has a 'page' designed that utilizes two form tags for functionally different sets of input fields. The answer Chris is that a page can have many forms and whether or not they trigger the same script upon submit or not doesn't matter. Go ahead! My sample

Re: [PHP] form handling

2011-08-11 Thread Jim Giner
Jim, This is what I am trying to do. One submit button for both forms going to the same destination. The only reason I am doing this is because I can't figure out why my ajax for my select menus is altering my tinyMCE textarea box. Ultimately if I can figure out how to control the ajax within

Re: [PHP] form handling

2011-08-11 Thread Chris Stinemetz
Chris, By definition, a 'submit' button submits a form.  Not 2 forms.  Each form has to have it's own form. It is not feasible to submit two forms - since the conversation from your client pc is going to be garbled even if you could (JS?) do the second submit.  One transactiion is going to

Re: [PHP] form handling

2011-08-11 Thread Bastien
On 2011-08-11, at 9:13 PM, Jim Giner jim.gi...@albanyhandball.com wrote: Jim, This is what I am trying to do. One submit button for both forms going to the same destination. The only reason I am doing this is because I can't figure out why my ajax for my select menus is altering my

Re: [PHP] form handling

2011-08-11 Thread Chris Stinemetz
I would bet it's the quotes screwing up the js. Can / are you escaping that variable when ajaxing it back? Bastien Koert 905-904-0334 I found a way to make the ajax work with one form. I removed the table and the ajax worked just fine. Aparently you can't embed div containers within a

Re: [PHP] Form handling

2005-05-13 Thread dan
Richard Lynch wrote: On Thu, May 12, 2005 12:55 pm, dan said: I was just looking for some sort of confirmity and ease of use. I've been experimenting with some of my own ways to handle form data. There's nothing that I hate more than clutter, so that's why I wanted to break the form apart inside

Re: [PHP] Form handling

2005-05-13 Thread Jason Barnett
Dan wrote: Richard Lynch wrote: ... The value added of the central switch seems dubious to me. Just my opinion. Richard - I want your opinion, which is why I'm taking a stab at the list ;) What other methods would be good to use? Using a giant if statement? Thanks -dant Nononono a giant if

Re: [PHP] Form handling

2005-05-13 Thread dan
Jason Barnett wrote: Dan wrote: Richard Lynch wrote: ... The value added of the central switch seems dubious to me. Just my opinion. Richard - I want your opinion, which is why I'm taking a stab at the list ;) What other methods would be good to use? Using a giant if statement? Thanks -dant

Re: [PHP] Form handling

2005-05-13 Thread Rory Browne
What other methods would be good to use? Using a giant if statement? Did you read my code for this? It consisted of two lines, which basicly did the same thing as your massive ugly switch statment. It also does a limited amount of error-checking, in that it checks to make sure that the file

Re: [PHP] Form handling

2005-05-12 Thread dan
Richard Lynch wrote: While this *CAN* work, and a lot of people like it, it tends to add a fair amount of cruft for not that much benefit, really... What do you GAIN having this big old switch statement? What data/processing is really really shared in all these steps? On Wed, May 11, 2005 4:57 pm,

Re: [PHP] Form handling

2005-05-12 Thread Richard Lynch
On Thu, May 12, 2005 12:55 pm, dan said: I was just looking for some sort of confirmity and ease of use. I've been experimenting with some of my own ways to handle form data. There's nothing that I hate more than clutter, so that's why I wanted to break the form apart inside of these smaller

Re: [PHP] Form handling

2005-05-12 Thread Rory Browne
Personally I'm lazy, but I'd probably go with something along the lines of $filename = sprintf(step%d.php, (int)($_SESSION['step']) ); require ( file_exists($filename) ? $filename : step1.php ); same results in two lines of code - was one line, but I split it into two lines to make it more

Re: [PHP] Form handling

2005-05-11 Thread Richard Lynch
While this *CAN* work, and a lot of people like it, it tends to add a fair amount of cruft for not that much benefit, really... What do you GAIN having this big old switch statement? What data/processing is really really shared in all these steps? On Wed, May 11, 2005 4:57 pm, dan said: Hello,

Re: [PHP] form handling problem

2001-09-19 Thread Meir Kriheli
On Monday 17 September 2001 06:01, Nikola Veber wrote: Hi ! I have a form form target = ?php echo $PHP_SELF ?; METHOD = get Is there a way to open PHP_SELF in the same window, not in the new one ? It should be form action = ?php echo $PHP_SELF; ? METHOD = get target is used as the name of

RE: [PHP] form handling problem

2001-09-17 Thread Jon Haworth
Well, form action=?php echo $PHP_SELF; ? method=get always works fine for me. Note that you should use action instead of target, and the semicolon after $PHP_SELF should be inside the ? not outside of it... might be one of these two errors causing the problem (although I can't think why)

Re: [PHP] form handling problem

2001-09-17 Thread Alexander Deruwe
On Monday 17 September 2001 15:24, you wrote: Well, form action=?php echo $PHP_SELF; ? method=get always works fine for me. Note that you should use action instead of target, and the semicolon after $PHP_SELF should be inside the ? not outside of it... might be one of these two errors