Jump to content

[SOLVED] Form + Redirect


andy182

Recommended Posts

I want to redirect to a page depending on the entered form data.I already made this script, but redirects to "$_Fname2.example.com" rather than "(the form data).example.com".

HTML form

<form method="post" action="2.php">
First Name:<input type="text" size="12" maxlength="12" name="Fname">:<br />
<br />
                    </form>

 

PHP code

<?php
$Fname = $_POST["Fname"];
header('Refresh: 2; url=$_Fname2.test.com');
echo "you will be redirected in 2 seconds.";
?>

 

Link to comment
https://forums.phpfreaks.com/topic/127140-solved-form-redirect/
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.