taith Posted February 23, 2007 Share Posted February 23, 2007 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" Quote Link to comment https://forums.phpfreaks.com/topic/39804-solved-double-forms/ Share on other sites More sharing options...
monk.e.boy Posted February 23, 2007 Share Posted February 23, 2007 You can't. The browser will post the form data to one URL. monk.e.boy Quote Link to comment https://forums.phpfreaks.com/topic/39804-solved-double-forms/#findComment-192239 Share on other sites More sharing options...
taith Posted February 23, 2007 Author Share Posted February 23, 2007 then how can i do something like that? i need one to open a popup with all of the info from a textarea... then a send link to submit emails with the info from the same textarea Quote Link to comment https://forums.phpfreaks.com/topic/39804-solved-double-forms/#findComment-192248 Share on other sites More sharing options...
TRI0N Posted February 23, 2007 Share Posted February 23, 2007 Ahhh.. DIdn't see your second reply... Simply have the $varible = $_REQUEST['Passing Varible']; in the page that is submitted to then create the pop-up. Quote Link to comment https://forums.phpfreaks.com/topic/39804-solved-double-forms/#findComment-192252 Share on other sites More sharing options...
TRI0N Posted February 23, 2007 Share Posted February 23, 2007 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... Quote Link to comment https://forums.phpfreaks.com/topic/39804-solved-double-forms/#findComment-192259 Share on other sites More sharing options...
taith Posted February 23, 2007 Author Share Posted February 23, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/39804-solved-double-forms/#findComment-192318 Share on other sites More sharing options...
taith Posted February 23, 2007 Author Share Posted February 23, 2007 owell... i can just do it the other way write page <--> preview --> send Quote Link to comment https://forums.phpfreaks.com/topic/39804-solved-double-forms/#findComment-192343 Share on other sites More sharing options...
weknowtheworld Posted February 23, 2007 Share Posted February 23, 2007 You can pass the whole string to other page and submit the form... Quote Link to comment https://forums.phpfreaks.com/topic/39804-solved-double-forms/#findComment-192345 Share on other sites More sharing options...
taith Posted February 23, 2007 Author Share Posted February 23, 2007 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* Quote Link to comment https://forums.phpfreaks.com/topic/39804-solved-double-forms/#findComment-192353 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.