Jump to content

[SOLVED] Forms Processing!


pkirsch

Recommended Posts

Hello,

I was wondering if (which it probably is) possible to pass info from a form, to a processing script, then to another processing script?

I'm thinking it would be using $_POST, $_GET or $_REQUEST.

 

If You Could Please let me know how to do this, that would be great.

 

Thanks for Your time,

pkirsch

Link to comment
Share on other sites

if you want uour users to need to click to get to the second processing script, yes. Just use another form and store your data within hidden fields.

 

An even better solution would be to (on the first process script) store the data in the $_SESSION array and then either redirect to the second process script or use a link.

Link to comment
Share on other sites

when info gets passed from a form it is normally in the form of $_POST

 

so your first processing page will used $_POST['whatever'] variables

 

its up to you how you get the information to the next page, you could use $_SESSION variables or $_GET variables either way works, except that $_GET variables are shown in the address bar so be careful what you show

Link to comment
Share on other sites

depends on your form... $_REQUEST holds both $_GET's data and $_POST's data so you can always access form data through $_REQUEST... now... on your <form method="post/get"> that determines how the form is sending the data to the next page... i use post, nearly always... now... after form is submited... you can access it through $_POST[fieldname];

Link to comment
Share on other sites

No, I don't want the user to click, I want the processor1.php to send the info to processor2.php!

 

Then store the data in a $_SESSION and redirect. I must ask though, why do you need 2 processing pages if the 2nd isn't going to be some kind of confirmation?

Link to comment
Share on other sites

well one page could do that, run the validation script as you would setting a variable to true or false dependent on the outcome then have an if statement on the bottom saying if(true) insert into database if(false) return to main page

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.