[SOLVED] Sending Data to another page
Posted: Sat Jul 17, 2004 11:05 pm
Total Newbie here.
Here is my page with the info.
How do i get $info to the confirmation page confirmed.php?
Here is my page with the info.
Code: Select all
<html>
<head><SCRIPT LANGUAGE="JavaScript">
function goToURL1() { window.location = "confirmed.php"; }
function goToURL2() { window.location = "form.html"; }
</script></head>
<body><?
$username=$_POST['username'];
$email=$_POST['email'];
$pass=$_POST['password'];
$pass1=$_POST['password1'];
$design=$_POST['design'];
$package=$_POST['package'];
$rollovers=$_POST['rollovers'];
$news=$_POST['news'];
$flash=$_POST['flash'];
$payment=$_POST['select'];
$cost = 0;
$count = strlen($pass);
if ($package != "PSD"){$psd = "No";
} else {$pack = "PSD Only.";
$cost = ($cost + 10);}
if ($package != "twopage"){$twopage = "No";
} else {$pack = "Two Page Basic";
$cost = ($cost + 20);}
if ($package != "Fullsite"){$fullsite = "No";
} else { $pack = "Full site Design";
$cost = ($cost + 30);}
if ($rollovers != "Yes"){$rollovers = "No";}
if ($news != "Yes"){$news = "No";
} else {$cost = ($cost + 5);}
if ($flash != "Yes"){$flash = "No";
} else {$cost = ($cost + 5);}
if ($count < 6){ echo '<font color="red">Passwords need to be at least 6 characters long.</font>';
include 'form.html';} elseif ($count > 12){ echo '<font color="red">Passwords need to be less than 13 characters long.</font>';
include 'form.html';} else {
$pass2 = md5($pass);
$pass3 = md5($pass1);
$regex =
'^'.
'[_a-z0-9-]+'.
'(\.[_a-z0-9-]+)*'.
'@'.
'[a-z0-9-]+'.
'(\.[a-z0-9-]{2,})+'.
'$';
if (eregi($regex, $email)){
if (($pass2 == $pass3) AND ($username != "")){
$info = 'Username is : '.$username.'<br> Email is : '.$email.'<br>Package: '.$pack.'<br> Rollovers: '.$rollovers.'<br> PHP News system: '.$news.'<br> Flash Nav: '.$flash.'<br>Total Price: $'.$cost.'<br>Payment Method: '.$payment.'<br> Design Info: <table width="425" height="234" border="0">'.$design.'<td>Are you sure this order is correct?'.'<td><form>
<input type=button value="Yes" onClick="goToURL1()"><input type=button value="No" onClick="goToURL2()">
</form></table>';
echo $info;
}elseif ($username == ""){echo '<font color="red">Please enter a Username</font>';
include 'form.html';}} else { echo '<font color="red">Please enter a valid email address.</font>';
include 'form.html';}}
?></body>
</html>