Jump to content

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

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.