Jump to content

Testing forms


jdm95lude

Recommended Posts

So this is what I want to do I need some input on if its possible and how to go about.

 

Form1 user fills out a few fields hits submit takes you to another form that has the same information already filled out but it has a few more fields as well.

 

Well what if the user doesn't want to fill out that extra information on the 2nd form and the exit out. I still want to be able to get the information they filled out in the first form.

 

But what if they fill out the first form and also the 2nd form I don't want to receive 2 emails from the same user.

 

This is my idea:

 

Form1 user fills out the form hits submit it creates the cookes as well as a test cookie.

User is not directed to a pop-up window thath as the previous information populated but there is also some extra fields to fill out.

If the user fills out the rest and hits submit it calls a custom email script that sends out the email and deletes all the cookies that were created.

If the user doest not fill out the form and closes the window then form1 is refreshed and checks to see if the "test" cookie exists and if it does then it calls a custom email script that sends an email with those cookies.

 

Please any and all input. Overall goal is to not sent 2 emails but capture all the information that was entered in by the user either 1 or 2 forms whichever they filled out.

 

-Thanks

Link to comment
https://forums.phpfreaks.com/topic/121870-testing-forms/
Share on other sites

Use a single page and use control statements to control what is show

 

example

<form>
<input>
<input
<input>

NOW SOME INPUTS TO ONLY SHOW IF WE SENT POST
<?php
if(!empty($_POST)){
?>
<input>
<input>
<input>

pre populate all form in puts with the value = $_POST['fieldname']

 

just a note you can process a form on the same page it loads

Link to comment
https://forums.phpfreaks.com/topic/121870-testing-forms/#findComment-628837
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.