Jump to content

[SOLVED] more than one action in a form


will_1990

Recommended Posts

in a form that resides in register.html i wish to not only send this to register2.php which insterts the information collected into a table l also wish to get the $email_address information and store it on a page that will come after the registration is complete.

 

eg the email is sent to the insert form and also collected by customer_info.php and stored in a variable on that page called $email_addresss.

 

is this possible?

 

hugely ggreatful to anyone who can point me in the right direction

Link to comment
Share on other sites

i echoed the $email from the registration page i was using rather than use 2 actions, if you find out how to use 2 tell me as im interested...

 

 

thanks

 

You can't have 2 actions.  You could use sessions to store the data.  On the page that the form action points to just store the variable in a session variable and recall it on the other page where you need it.

Link to comment
Share on other sites

<input type="submit" name="something" value="something">
<input type="submit" name="somethingelse" value="somethingelse">

 

$something = $_POST["something"];
$somethingelse = $_POST["somethingelse"];

if($something){
echo "something";
}

if($somethingelse){
echo "somethingelse";
}

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.