dwest Posted January 25, 2007 Share Posted January 25, 2007 I've got a form with several submit buttons.The form posts to a processing page which first determines what submit button was clicked, and then runs a corresponding function.All of those functions post back to the original form with the results of the functions.I need one of those functions to simply take the posts from the original form and post them back without stopping for the user to click a submit button.Is that possible?Thanks! Quote Link to comment Share on other sites More sharing options...
linuxdream Posted January 25, 2007 Share Posted January 25, 2007 You could just do a GET request back to the original form page. So in that special function just do a redirect with originalform.htm?postvar1=value1&postvar2=value2 as the URLIf your functions are before the header output, you can use a header location redirect, otherwise you'll have to use javascript redirect. Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 25, 2007 Share Posted January 25, 2007 or save to the session so that the users can't see it. Quote Link to comment Share on other sites More sharing options...
dwest Posted January 25, 2007 Author Share Posted January 25, 2007 Any quickie code clips on a javascript redirect so I can use POST? I know no javascript :-(I've avoided sessions purposely with this and don't want to use them now just to accommodate this one little thing. I do appreciate the suggestion though :)I thought about get but there are a ton of variables as this loop repeats until the user is satisfied. Are there any side effects of really loooooong urls? Quote Link to comment Share on other sites More sharing options...
dwest Posted January 25, 2007 Author Share Posted January 25, 2007 Oh, and actually it's an array that being passed back and forth. Thus the POST is essential. Can I GET with an array? Quote Link to comment Share on other sites More sharing options...
linuxdream Posted January 25, 2007 Share Posted January 25, 2007 I believe you can if you serialize()/unserialize() it first, though I'm not sure about that...jesirose, any ideas? As far as length, I know that there are no specific limits (in the RFC...I think) other than what a browser will support. Explorer only goes to 2,048 characters...so it might work. If you are thinking that the user might be doing this a lot, then sessions would probably work best, even just on one page. Quote Link to comment Share on other sites More sharing options...
dwest Posted January 25, 2007 Author Share Posted January 25, 2007 Thanks much!I'll go to the javascript forum and see about getting a javascript redirect going on this part. :) Quote Link to comment Share on other sites More sharing options...
Psycho Posted January 25, 2007 Share Posted January 25, 2007 No need for javascript. Just use header("Location: ") after you have run your function. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.