the errors:
while they seem simple, i don't understand why i'm getting them. here's the begining of the code that decides which functions to call:Warning: Wrong parameter count for header() in /usr/users/m3rajk/WWW/JMT/randomTest/signuptest/signup.php on line 59
Fatal error: Cannot redeclare header() in /usr/users/m3rajk/WWW/JMT/randomTest/signuptest/signup.php on line 66
Code: Select all
<?php
/* ******************************************
** call to (the main profile table of the) database **
******************************************* */
/* get a list of usernames from the db, set it to array: $uns */
/* *****************************************
** set any and all variables that need **
** to be set **
***************************************** */
$step=$_POST['step']; $un=$_POST['un']; $email=$_POST['email']; # set step/username/email
$pw=$_POST['pw']; $conf=$_POST['conf']; $waist=$_POST['waist']; # set password/confimation code/waist size
$eye=$_POST['eye']; $lbs-$_POST['weight']; $religion=$_POST['religion']; # set eye color/weight/religion
$ethnicity=$_POST['ethnicity']; $city=$_POST['city']; $aim=$_POST['aim']; # set ethnicity/city/aim sn
$mirc=$_POST['mirc']; $icq=$_POST['icq']; $yim=$_POST['yim']; #set mirc/icq uin/yim sn
$main=$_POST['main']; $t1=$_POST['t1']; $t2=$_POST['t2']; # set main/thumb1/thumb2
$t3=$_POST['t3']; $t4=$_POST['t4']; $salute=$_POST['salute']; # set thumb3/thumb4/salute
/* *******************************************************
** find where we are and call the creation functions **
******************************************************* */
if(isset($step)){
if($step>1){
if($step==3){
/* check for username against database */ /*
for($i=0;$i<count($uns);$i++){
if($un==$uns[$i]){ $err='yes'; $step=2; break; } # set $err, drop $step, and leave the for loop
} */
}elseif($step==5){
/* check the confirmation code */
if($_SESSION['uid']!==$conf){
$err='yes'; $step=4; # set err and decrement step
} /*
else{
## process files uploaded, set $err if something goes wrong
} */
}
}
if($step==1){ # we're starting the sign up
sus(); header(); su1();
}elseif(($step==2)&&($err !== 'yes')){ # we're in the second step for the first time
header(); su2();
}elseif($step==2){ # we must have an error
header(); su2e();
}elseif($step==3){ # 3rd step
header(); su3();
}elseif(($step==4)&&($err !== 'yes')){ # we're on the 4th step for the first time
header(); su4();
}elseif($step==4){ # we must have an error
header(); su4e();
}else{ # we must be done signing up
header(); su5();
}
}else{ # we need to start the sign up
$step=1; sus(); header(); su1();
}Code: Select all
function header(){ # create a header for each page
?><html>
<head>
<title>FindYourDesire.com Signup page -- <?php echo "$step"; ?></title>
<meta name="Author" content="coded by: Josh Perlmutter; images by Morgan O'Brien-Bledsow & Tamara Collette all rights reserved">
<style type="text/css">
<!-- this comment is for non-css compliant browsers
{text-decoration=none}
end of css -->
</style>
</head>
<body bgcolor="#000000" text="#c8c8c8" alink="#fc00ff" vlink="#00e0c4" link="#ffffff">
<center><p> </p>
<?php
}
function sus(){
session_start(); // start a session
$_SESSION['uid']= uniqid(microtime(),1); // create a unique id for the session.
}
function su1(){
?>
<h1>THIS IS A TEST. IT DOES NOT HAVE A DATABASE CONNECTION NOR DOES IT CHECK USERNAMES. THIS LINE WILL BE REMOVED IN THE REAL ONE </h1>
<p>Thank you for your interest in signing up for FindYourDesire.com. Before you can sign up, you need to agree to a few baisc terms of service</p>
<form name="step1" action="<?php echo "$_SERVER[PHP_SELF]"; ?>" method="POST" onSubmit="return validate();">
<input type="hidden" name="step" value="2">
<table frame="void" border="0" cellspacing="0" cellpadding="0" bgcolor="#000000">
<tr><td>I have read and agree to the <a name="#privacy" href="#privacy" onClick="window.open('faq.php?seek=privacy', 'faq', 'height=250,width=500,scrollbars=yes');">Privacy Policy</a></td><td><input type="checkbox" name="privacy" value="agree"></td></tr>
<tr><td>I have read and agree to the <a name="#fcc" href="#fcc" onClick="window.open('faq.php?seek=fcc', 'faq', 'height=250,width=500,scrollbars=yes');">Forum Civilty Code</a></td><td><input type="checkbox" name="fcc" value="agree"></td></tr>
<tr><td>I have read and agree to the <a name="#gtu" href="#gtu" onClick="window.open('faq.php?seek=gtu', 'faq', 'height=250,width=500,scrollbars=yes');">General Terms of Use</a></td><td><input type="checkbox" name="gtu" value="agree"></td></tr>
<tr><td>I have read and agree to the <a name="#lw" href="#lw" onClick="window.open('faq.php?seek=lw', 'faq', 'height=250,width=500,scrollbars=yes');">Liabilty Waiver</a></td><td><input type="checkbox" name="lw" value="agree"></td></tr>
<tr><td><input type="submit" value="Go To The Next Step"></td><td><input type="reset" value="Restart This Step"></td></tr>
</table></form>
<script language="javascript">
function validate(){
if(document.step1.privacy.checked !== true){alert("You MUST agree to the Privacy Policy to continue"); return false;};
else if(document.step1.fcc.checked !== true){alert("You MUST agree to the Forum Civility Code to continue"); return false;};
else if(document.step1.gtu.checked !== true){alert("You MUST agree to the General Terms of Use to continue"); return false;};
else if(document.step1.lw.checked !== true){alert("You MUST agree to the Liability Waiver to continue"); return false;};
else{return true};}
</script>
</center></body></html>
<?php
}