Jump to content

Form Submission Return Page


marshmarsh

Recommended Posts

<form method="post" action="webpage.php">this will mean that when the form is submitted it will load webpage.php and any thing within the form will be accessible to webpage.php by using $_POST.like <form method="post" action="webpage.php"><input type="text" name="name"><input type="submit" value="submit"></form>you could access the information they put in the textfield with $_POST['name']

Link to comment
Share on other sites

How do I send users to a particular web page after they have submitted a form? I've used the echo statement to send them to a page that says 'thank you' but I would like to send them to an actual nicely designed page.
I'm sorry I guess I didn't give enough information initially. I already have an action which is a php script that writes the form submission data to a mysql database. I would like to have it then take them to a different page, "thank you for subscribing..."
Link to comment
Share on other sites

you can do that on the same page. just have "thank you for subscribing" or whatever within a conditional statement after the database input... could be like if($subscribed == "TRUE"){ echo "Thank you for subscribing... etc.";}and you could put $subscribed = "TRUE";just under where you are inserting the database info

Link to comment
Share on other sites

Instead of simply outputting "Thank you..." I'd like to actually send them to a different url, perhaps www.mydomain.com/thankyou.html, which has consistent formatting with the rest of my site, instead of a blank white page that says 'thank you.' So how do I send the user to a different page? Thanks.

you can do that on the same page. just have "thank you for subscribing" or whatever within a conditional statement after the database input... could be like if($subscribed == "TRUE"){ echo "Thank you for subscribing... etc.";}and you could put $subscribed = "TRUE";just under where you are inserting the database info
Link to comment
Share on other sites

They were trying to say that you can put exactly what you want on your form processor page, it doesn't just need to be a white page, you can put whatever you want there to make it look like the rest of your site. If you just want to redirect, you can use a location header.header('Location: page.php');

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...