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
https://forums.phpfreaks.com/topic/136617-solved-more-than-one-action-in-a-form/
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.

<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";
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.