Jump to content

[SOLVED] double forms


taith

Recommended Posts

anyone know how to forms within forms? i need to be able to send the same information to two seperate pages, from $_POST

 

<?php 
print_r($_POST);
?>
<form action="?" method="post" name="two">
<input type=hidden value="two" name="twos">
<form action="?" method="post" name="one">
  <input type=hidden value="one" name="ones">
  <a href="javascript:void(document.one.submit())">one</a>
</form>
<a href="javascript:void(document.two.submit())">two</a>
</form>

that gives me a java error of "Error:'document.one' is null or not an object"

Link to comment
https://forums.phpfreaks.com/topic/39804-solved-double-forms/
Share on other sites

Submit the form..

 

Target Page Form is Pointed to:

 

<?php

$email = $_REQUEST['email'] ;

$name = $_REQUEST['name'] ;

?>

 

Create the Pop-Up Code with the $varibles you need to use...

 

Create the Send Mail Code with the same $varibles you need to use...

Link to comment
https://forums.phpfreaks.com/topic/39804-solved-double-forms/#findComment-192259
Share on other sites

sure... if i wanted to do both at the same time... but i want them seperate...

- button on [preview] --> opens popup, shows what email will look like, can view changes and the likes(doesnt submit original page);

- button two [send] --> submits the form, sends email

Link to comment
https://forums.phpfreaks.com/topic/39804-solved-double-forms/#findComment-192318
Share on other sites

ya... i was trying to get away from that tho... get it targeting a new page, instead of refreshing...

 

perhaps using ajax... set a timer to "autosave" it to a session, then preview button just java opens popup, and loads from them sessions... which is a swell idea! good idea me! *runs off, laughing like a maniac*

Link to comment
https://forums.phpfreaks.com/topic/39804-solved-double-forms/#findComment-192353
Share on other sites

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.