1: I use register.php to register clients,
2: data received from the form is sent to 1.php, they are stored in the database
3: after saving the form data in the 1.php database it sends the selected form data (myValue) to register.php? myValue = 'abc'
in 1.php, I save a session variable like this
@session_start();
$_SESSION['color']='blue';
register.php code
if (isset($_SESSION['color'])) {
header('Location: http://mydomain.com/thankyou.php');
}
else {
@session_start();
some other stuff that was initially use for signing up the clients
my logic is to check the session variable and redirect it to some other page
when step 1, step 2 and step 3 are completed, the page should be redirected to thankyou.php
currently, when step 1, step 2, step 3, instead of opening thankyou.php, the following page opens
http://mydomain.com/register.php?myValue='abc'
, register.php 1 ( register.php), thankyou.php...
- , ? , ?
register.php
@session_start();
if (isset($_SESSION['color'])) {
header('Location:http://mydomain.com/thankyou.php');
exit;
}
else{
remaining stuff
, , ( ), thankyou.php, ( , .)