Page 1 of 1

can't find the error

Posted: Wed Aug 23, 2006 6:56 pm
by paqman
I've been going over this code for a few hours now and it keeps saying it's finding an error right before the bottom (will point out in the code). I know it's a lot of code, but I can't figure it out. I've taken out a bunch of code at the start and finish (haven't changed those parts and know they arent the problem)

Code: Select all

<? session_start(); 



// start session
if(isset($_SESSION["s_name"])) { ?>
<script type="text/javascript">
<!--
setTimeout("location.href='order.php?stage=save<? echo $stage; ?>&refer=logout'",5000);
// -->
</script><?
if(!isset($stage) && !isset($cmd)) { $stage = 1; } 



// stage 1: Design
if($stage == 1) { 
$sql2 = mysql_query("SELECT * FROM weborder WHERE username_3 = '$s_username'");
while($f=mysql_fetch_array($sql2))
{
$color_1 = $f["color_1"];
$logo_1 = $f["logo_1"];
$logo_info_1 = $f["logo_info_1"];
$feel_1 = $f["feel_1"];
$splash_1 = $f["splash_1"];
$other_1 = $f["other_1"]; ?>
<p>Welcome to the Online Website Order Form. Before we begin, please keep in mind that you should refrain from using your browser's 'Back' button if possible; use the built in back button instead. Also, every time you click 'continue' at the bottom of a page, all the entered information is saved. If you leave a field blank, you can edit it later by clicking the edit button to the left of the corresponding step on the bar to your left. Even if you complete the form and wish to change some information, you can always do so from the Client Control Panel (accessible from the main Paqman Web site).</p>
<p>The more you write, the better. Don't worry about being repetative; more information will reduce the time it takes for me to create your website and will lower the amount of questions I will have to ask you after you complete this form.</p>
<hr>
<form method="post" action="order.php?stage=save1" ENCTYPE="multipart/form-data">
<p>Let's begin. Please describe what colour scheme you'd like for your website. Try to include the colours for each part, such as 'main text should be green, links should be orange, background will be black, area behind text will be blue, etc.' I've found a helpful tool which displays web-safe colours in comparison to eachother. You can access it <a href="http://www.visibone.com/colorlab/big.html" target="pop">here</a>. If you find the colours you want, please send me either their names (Dark-Blue) or their hex code (#000000), which is displayed on the colour lab page.</p>
<center><textarea rows=15 cols=75 name="color_1"><? echo $color_1; ?></textarea></center><br><br>

<p>Do you have a logo which you'd like to base your website on (colour scheme, shape, etc)? If so, please locate it in the box below. Please be smart - don't upload anything malicious. If you do have something to upload, please explain how you'd like to base your website on it using the box underneath the upload bar. If you've already uploaded a file and wish to change it, simply locate the file in the box and click 'continue' at the bottom of this page. The old file will be deleted automatically.</p>
<? if(strlen($logo_1) > 0) { ?><a href="upload/<? echo $s_username; ?>_logo.<? echo $logo_1; ?>" target="logo">View current uploaded picture</a><br><br><? } ?>
<center>
<input type="file" name="logo_file" size=80><br>
<textarea rows=15 cols=75 name="logo_info_1"><? echo $logo_info_1; ?></textarea></center><br><br>

<p>Please describe the 'feel' you'd like your website to have. An example of a sharp, edgy website is <a href="http://colleenbrow.com/" target="feel">http://colleenbrow.com</a>. A soft, mellow, rounded one is <a href="http://stevegrout.com/main/" target="feel">http://stevegrout.com/</a>.</p>
<center><textarea rows=15 cols=75 name="feel_1"><? echo $feel_1; ?></textarea></center><br><br>

<p>Would you like a splash page? A splash page is usually a simple icon or picture which a visitor sees before they are at your main website. An example is <a href="http://stevegrout.com/" target="splash">http://stevegrout.com/</a>. If you would like one, please describe it in the box below.</p>
<center><textarea rows=15 cols=75 name="splash_1"><? echo $splash_1; ?></textarea></center><br><br>

<p>Anything else? If you have any websites which you love the look of, include them here (their http://www.com addresses). </p>
<center><textarea rows=15 cols=75 name="other_1"><? echo $other_1; ?></textarea></center><br><br>

<p>If you're satisfied with your answers on this page, please press the button below. *Note: because you may be uploading a file (your logo), it may take a while for this page to proceed to the next. If this is the case, just let things be; don't click the button repeatedly or press the back button.</p>
<input type="hidden" value="<? echo $refer; ?>" name="refer">
<input type="submit" name="submit" value="Continue"><br>
<? }
}

// stage 1 save
if($stage == "save1") {

$color_1 = $_POST["color_1"];
$logo_file = $_POST["logo_file"];
$logo_info_1 = $_POST["logo_info_1"];
$feel_1 = $_POST["feel_1"];
$splash_1 = $_POST["splash_1"];
$other_1 = $_POST["other_1"];
$refer = $_POST["refer"];

if(is_uploaded_file($_FILES['logo_file']['tmp_name'])) {
echo 'theres a picture here!<br>';
$uploaddir = '/home/paqmanwe/public_html/bnew/upload/';
$uploadfile = $uploaddir . basename($_FILES['logo_file']['name']);
move_uploaded_file($_FILES['logo_file']['tmp_name'], $uploadfile);
$ext = substr($uploadfile, -3, 3);
rename($uploadfile, $uploaddir.$s_username."_logo.".$ext);
$prsql = "UPDATE weborder SET logo_1='$ext' WHERE username_3='$s_username'"; 
if(mysql_query($prsql)) { echo 'mysql success!<br>'; } else { echo 'mysql failure<br>'; }
echo 'Image successfully uploaded<br>'; }

$sql = "UPDATE weborder SET color_1='$color_1',logo_info_1='$logo_info_1',feel_1='$feel_1',splash_1='$splash_1',other_1='$other_1',finished1='1' WHERE username_3='$s_username'";
$result = mysql_query($sql);
if($refer !== "logout") { ?>
<body onload=setTimeout("location.href='order.php?stage=<? if(strlen($refer) > 0) { echo $refer; } if(strlen($refer) == 0) { echo "2"; } ?>'",1200)>
<p>Entries saved successfully. Continuing...</p> <? }
if($refer == "logout") { 
$sql = "UPDATE weborder SET finished1='0' WHERE username_3='$s_username'"; ?>
<body onload=setTimeout("location.href='order.php?cmd=logout&display=timeout'",1200)>
<p>Session timed out. Progress saved. Redirecting...</p> <? }
 }








// stage 2: content
if($stage == "2") { 
$sql2 = mysql_query("SELECT * FROM weborder WHERE username_3 = '$s_username'");
while($f=mysql_fetch_array($sql2))
{
$divisions_2 = $f["divisions_2"];
$multimedia_2 = $f["multimedia_2"];
$dynamic_2 = $f["dynamic_2"];
$title_2 = $f["title_2"];
$meta_2 = $f["meta_2"];
$footer_2 = $f["footer_2"];
 ?>
<form method="post" action="order.php?stage=save2">
<p>Now onto the Content aspect of your website. What divisions are you planning on having (bio, guestbook, home page, contact, etc)?</p>
<center><textarea rows=15 cols=75 name="divisions_2"><? echo $divisions_2; ?></textarea></center><br><br>

<p>Are you planning on having any multimedia files on your website(videos, flash, large amounts of pictures)? Describe them.</p>
<center><textarea rows=15 cols=75 name="multimedia_2"><? echo $multimedia_2; ?></textarea></center><br><br>

<p>Do you want a Dynamic Website (if yes, you will be able to change content on your own at any point in time)? If yes, which parts are you planning on having dynamic?</p>
<center><textarea rows=15 cols=75 name="dynamic_2"><? echo $dynamic_2; ?></textarea></center><br><br>

<p>What is the title of your website going to be (the place where it says 'Paqman Web Services - Order Now' on this window)?</p>
<center><input type="text" name="title_2" value="<? echo $title_2; ?>" size=50></center><br><br>

<p>Come up with some keywords (for META tags, which are used by search engines) for your website. Separate each keyword or keyphrase (no more than a few words long) with a comma. Try to get every aspect possible, and don't worry about repeating a similar concept (White Paper -> white, white paper, paper, flat paper, flat white paper, etc). Don't worry too much about these right now, just know that I will eventually need them.</p>
<center><textarea rows=15 cols=75 name="meta_2"><? echo $meta_2; ?></textarea></center><br><br>

<p>What type of footer would you like (if any)? Would you like 'core' links (such as Site Map - Contact - About - Terms & Conditions) or would you like legal notes (&copy; Your-Name 2006)?</p>
<center><textarea rows=15 cols=75 name="footer_2"><? echo $footer_2; ?></textarea></center><br><br>

<input type="hidden" name="refer" value="<? echo $refer; ?>">
<input type="submit" value="Continue">
</form>
<? }
}



//save2
if($stage == "save2") {
$divisions_2 = $_POST["divisions_2"];
$multimedia_2 = $_POST["multimedia_2"];
$dynamic_2 = $_POST["dynamic_2"];
$title_2 = $_POST["title_2"];
$meta_2 = $_POST["meta_2"];
$footer_2 = $_POST["footer_2"];
$refer = $_POST["refer"];

$sql = "UPDATE weborder SET divisions_2='$divisions_2',multimedia_2='$multimedia_2',dynamic_2='$dynamic_2',title_2='$title_2',meta_2='$meta_2',footer_2='$footer_2',finished2='1' WHERE username_3='$s_username'";
$result = mysql_query($sql); ?>
if($refer !== "logout") { ?>
<body onload=setTimeout("location.href='order.php?stage=<? if(strlen($refer) > 0) { echo $refer; } if(strlen($refer) == 0) { echo "3"; } ?>'",1200)>
<p>Entries saved successfully. Continuing...</p> <? }
if($refer == "logout") { 
$sql = "UPDATE weborder SET finished2='0' WHERE username_3='$s_username'"; ?>
<body onload=setTimeout("location.href='order.php?cmd=logout&display=timeout'",1200)>
<p>Session timed out. Progress saved. Redirecting...</p> <? }
 }



















// stage 3: Admin Options
if($stage == "3") { 
$sql2 = mysql_query("SELECT * FROM weborder WHERE username_3 = '$s_username'");
while($f=mysql_fetch_array($sql2))
{
$otherusername_3 = $f["otherusername_3"];
$otherpassword_3 = $f["otherpassword_3"];
$email_3 = $f["email_3"];
$stats_3 = $f["stats_3"];
$domain_3 = $f["domain_3"];
$security_3 = $f["security_3"];
$admin_3 = $f["admin_3"];
$hosting_3 = $f["hosting_3"]; ?>
<form method="post" action="order.php?stage=save3">
<p>Now for the Admin Option section. What master username and password would you like for every aspect of your website (log in for admin area, etc)? If you'd like the same as you've used for this session, enter them again in the corresponding areas.</p>
<center>
<table style="font-size: 12px; font-family: Verdana;"><tr><td>Username: </td><td><input type="text" name="otherusername_3" value="<? echo $otherusername_3; ?>"></td></tr>
<tr><td>Password: </td><td><input type="password" name="otherpassword_3" value="<? echo $otherpassword_3; ?>"></td></tr></table></center><br><br>

<p>Describe the email set up you'd like (a single email for yourself? a few for different areas/people? hundreds?). Do you have Microsoft Outlook, Outlook Express or Thunderbird?</p>
<center><textarea rows=15 cols=75 name="email_3"><? echo $email_3; ?></textarea></center><br><br>

<p>Would you like to monitor your website's stats (visitors, clicks per visit, country of your visitors, etc)?</p>
<center><textarea rows=15 cols=75 name="stats_3"><? echo $stats_3; ?></textarea></center><br><br>

<p>What are your top choices for a domain? Available extensions (included in all packages) are .com, .net, .org, .biz, .info, and .us. Any other domains will cost more money, but are possible to get (such as .ca). To check a domain's availability, go to <a href="http://www.whois.net/" target="whois">http://www.whois.net/</a> and enter the domain under 'Get your own Domain Name.' Please do not register it yet, just check to see if it's there. If you register it, you will not get your money back.</p>
<center><textarea rows=15 cols=75 name="domain_3"><? echo $domain_3; ?></textarea></center><br><br>

<p>What kind of security will you need while your website is being built? Would yourdomain.com/test be an okay place to have the files, or should it be password-protected (people might be able to find it) so that no one except people you've allowed can access it?</p>
<center><textarea rows=15 cols=75 name="security_3"><? echo $security_3; ?></textarea></center><br><br>

<p>If you have a Dynamic Website, how would you like the admin area to work? Would you like a link from your website (which anyone can find easily) or would you just like it to be at a certain location (yourdomain.com/admin/)? Will you have more than one log in account? Will you need to add/modify/remove accounts?</p>
<center><textarea rows=15 cols=75 name="admin_3"><? echo $admin_3; ?></textarea></center><br><br>

<p>What type of hosting do you think you will need at this time?</p>
<p><b>Option 1: Paqman Shared Hosting</b></p>
<p>Your domain will be added onto my hosting account with Bluehost and all of your files will be in my server space. Your website will still appear completely independant of mine, but you will be sharing bandwidth and space (although, they should never run out considering how much Bluehost offers). You also recieve monthly backups of your entire website, as well as free routine maintenance. If there are any small glitches in your website after I have completed all work, I will fix them for you. This type of hosting is <b>$40 CAD/year</b></p>
<p><b>Option 2: Monitored Hosting</b></p>
<p>You will have your own account with a host of your choice, although I strongly recommend Bluehost. I will still perform the same maintenance as I would in Paqman Shared Hosting. If you choose Bluehost, you will pay <b>$6.95/month (bluehost) + $20 CAD/year (me).</b></p>
<p><b>Option 3: Independant Hosting</b></p>
<p>You will sign up with your own host and allow me access to upload your files until I have finished the website. Upon completion, I have no responsibility to fix any glitches which we did not catch before release or to perform maintenance on your website. If you are computer savy, this package is probably the best for you. You will of course recieve a back up cd upon the completion of your website. This package costs as much as the host of your choice charges you.</p>
<center><textarea rows=15 cols=75 name="hosting_3"><? echo $hosting_3; ?></textarea></center><br><br>

<input type="hidden" name="refer" value="<? echo $refer; ?>">
<input type="submit" value="Continue">
</form>
<? }
}



//save3
if($stage == "save3") {
$otherusername_3 = $_POST["otherusername_3"];
$otherpassword_3 = $_POST["otherpassword_3"];
$email_3 = $_POST["email_3"];
$stats_3 = $_POST["stats_3"];
$domain_3 = $_POST["domain_3"];
$security_3 = $_POST["security_3"];
$admin_3 = $_POST["admin_3"];
$hosting_3 = $_POST["hosting_3"];
$refer = $_POST["refer"];

$sql = "UPDATE weborder SET otherusername_3='$otherusername_3',otherpassword_3='$otherpassword_3',email_3='$email_3',stats_3='$stats_3',domain_3='$domain_3',security_3='$security_3',admin_3='$admin_3',hosting_3='$hosting_3',finished3='1' WHERE username_3='$s_username'";
$result = mysql_query($sql);
if($refer !== "logout") { ?>
<body onload=setTimeout("location.href='order.php?stage=<? if(strlen($refer) > 0) { echo $refer; } if(strlen($refer) == 0) { echo "4"; } ?>'",1200)>
<p>Entries saved successfully. Continuing...</p> <? }
if($refer == "logout") { 
$sql = "UPDATE weborder SET finished3='0' WHERE username_3='$s_username'"; ?>
<body onload=setTimeout("location.href='order.php?cmd=logout&display=timeout'",1200)>
<p>Session timed out. Progress saved. Redirecting...</p> <? }
 }


















// stage 4: other Options
if($stage == "4") { 
$sql2 = mysql_query("SELECT * FROM weborder WHERE username_3 = '$s_username'");
while($f=mysql_fetch_array($sql2))
{
$use_4 = $f["use_4"];
$audience_4 = $f["audience_4"];
$link_4 = $f["link_4"];
$advertising_4 = $f["advertising_4"];
$security_4 = $f["security_4"]; ?>
<form method="post" action="order.php?stage=save4">

<p>What will this website be used for? Business or Personal purposes? Please describe.</p>
<center><textarea rows=15 cols=75 name="use_4"><? echo $use_4; ?></textarea></center><br><br>

<p>Who is your target audience (teens who like mountain bikes, seniors who need new sidewalks, etc)?</p>
<center><textarea rows=15 cols=75 name="audience_4"><? echo $audience_4; ?></textarea></center><br><br>

<p>What type of security will you need? Are you willing to pay for a SSL Certificate and have your website completely encrypted when needed, or do you just want a Name Certificate? Refer to <a href="index.php?page=faq" target="new">'What about security?'</a> (last article) for more information. If you aren't sure what you need, what type of information will be passed back and forth on your website (names, addresses, credit card numbers, etc)?</p>
<center><textarea rows=15 cols=75 name="security_4"><? echo $security_4; ?></textarea></center><br><br>

<p>I would really appreciate it if I could place a small link to this website on the bottom of your website, to help promote my services. I make these links follow the theme of the website, so it doesn't look out of place. If you have any problem with this, please fill out the next box.</p>
<center><textarea rows=15 cols=75 name="link_4"><? echo $link_4; ?></textarea></center><br><br>

<p>Would you like to do any serious advertising? If so, how much money would you be willing to spend per month on it? Would you be willing to put ads on your website to try and make some of the money back?</p>
<center><textarea rows=15 cols=75 name="advertising_4"><? echo $advertising_4; ?></textarea></center><br><br>

<input type="hidden" name="refer" value="<? echo $refer; ?>">
<input type="submit" value="Continue">
</form>
<? }
}



//save4
if($stage == "save4") {
$use_4 = $_POST["use_4"];
$audience_4 = $_POST["audience_4"];
$link_4 = $_POST["link_4"];
$advertising_4 = $_POST["advertising_4"];
$security_4 = $_POST["security_4"];
$refer = $_POST["refer"];

$sql = "UPDATE weborder SET use_4='$use_4',audience_4='$audience_4',link_4='$link_4',advertising_4='$advertising_4',security_4='$security_4',finished4='1' WHERE username_3='$s_username'";
$result = mysql_query($sql); 
if($refer !== "logout") { ?>
<body onload=setTimeout("location.href='order.php?stage=<? if(strlen($refer) > 0) { echo $refer; } if(strlen($refer) == 0) { echo "5"; } ?>'",1200)>
<p>Entries saved successfully. Continuing...</p> <? }
if($refer == "logout") { 
$sql = "UPDATE weborder SET finished4='0' WHERE username_3='$s_username'"; ?>
<body onload=setTimeout("location.href='order.php?cmd=logout&display=timeout'",1200)>
<p>Session timed out. Progress saved. Redirecting...</p> <? }
 }




// stage 5: personal info
if($stage == "5") { 
$sql2 = mysql_query("SELECT * FROM weborder WHERE username_3 = '$s_username'");
while($f=mysql_fetch_array($sql2))
{
$first_5 = $f["first_5"];
$last_5 = $f["last_5"];
$phone_5 = $f["phone_5"];
$cell_5 = $f["cell_5"];
$email_5 = $f["email_5"];
$address_5 = $f["address_5"];
$city_5 = $f["city_5"];
$region_5 = $f["region_5"];
$country_5 = $f["country_5"];
$postal_5 = $f["postal_5"];
$company_5 = $f["company_5"];
$position_5 = $f["position_5"];
$skill_5 = $f["skill_5"]; ?>
<form method="post" action="order.php?stage=save5">

<p>Please fill out all of your information:</p>
<table style="font-size: 10px; width: 500px;">
<tr><td>First Name:</td><td><input type="text" name="first_5" value="<? echo $first_5; ?>"></td>
<td>Last Name:</td><td><input type="text" name="last_5" value="<? echo $last_5; ?>"></td></tr>
<tr><td>Phone:</td><td><input type="text" name="phone_5" value="<? echo $phone_5; ?>"></td>
<td>Cell:</td><td><input type="text" name="cell_5" value="<? echo $cell_5; ?>"></td></tr>
<tr><td>Email:</td><td><input type="text" name="email_5" value="<? echo $email_5; ?>"></td><td><br><br></td></tr>

<tr><td>Address:</td><td><input type="text" name="address_5" value="<? echo $address_5; ?>"></td>
<td>City:</td><td><input type="text" name="city_5" value="<? echo $city_5; ?>"></td></tr>
<tr><td>Province:</td><td><input type="text" name="region_5" value="<? echo $region_5; ?>"></td>
<td>Country:</td><td><input type="text" name="country_5" value="<? echo $country_5; ?>"></td></tr>
<tr><td>Postal Code:</td><td><input type="text" name="postal_5" value="<? echo $postal_5; ?>"></td>
<td><br><br></td></tr>

<tr><td>Company:</td><td><input type="text" name="company_5" value="<? echo $company_5; ?>"></td>
<td>Position:</td><td><input type="text" name="position_5" value="<? echo $position_5; ?>"></td></tr>
<tr><td>Computer Skill:</td></td></tr>
<tr><td colspan=4><input type="radio" name="skill_5" value="Basic Computer User" <? if($skill_5 == "Basic Computer User") { echo 'checked'; } ?>> Basic Computer User (emails, web surfing)<br>
<input type="radio" name="skill_5" value="Proficient Computer User" <? if($skill_5 == "Proficient Computer User") { echo 'checked'; } ?>> Proficient Computer User (knows how a computer runs and how the internet basically works)<br>
<input type="radio" name="skill_5" value="Advanced User" <? if($skill_5 == "Advanced User") { echo 'checked'; } ?>> Advanced User (knows how to program, etc)<br></td>
</tr>
</table>

<input type="hidden" name="refer" value="<? echo $refer; ?>">
<input type="submit" value="Continue">
</form>
<? }
}



//save5
if($stage == "save5") {
$first_5 = $_POST["first_5"];
$last_5 = $_POST["last_5"];
$phone_5 = $_POST["phone_5"];
$cell_5 = $_POST["cell_5"];
$email_5 = $_POST["email_5"];
$address_5 = $_POST["address_5"];
$city_5 = $_POST["city_5"];
$region_5 = $_POST["region_5"];
$country_5 = $_POST["country_5"];
$postal_5 = $_POST["postal_5"];
$company_5 = $_POST["company_5"];
$position_5 = $_POST["position_5"];
$skill_5 = $_POST["skill_5"];
$refer = $_POST["refer"];

$sql = "UPDATE weborder SET first_5='$first_5',last_5='$last_5',phone_5='$phone_5',cell_5='$cell_5',email_5='$email_5',address_5='$address_5',city_5='$city_5',region_5='$region_5',country_5='$country_5',postal_5='$postal_5',company_5='$company_5',position_5='$position_5',skill_5='$skill_5',finished5='1' WHERE username_3='$s_username'";
$result = mysql_query($sql);
if($refer !== "logout") { ?>
<body onload=setTimeout("location.href='order.php?stage=<? if(strlen($refer) > 0) { echo $refer; } if(strlen($refer) == 0) { echo "6"; } ?>'",1200)>
<p>Entries saved successfully. Continuing...</p> <? }
if($refer == "logout") { 
$sql = "UPDATE weborder SET finished5='0' WHERE username_3='$s_username'"; ?>
<body onload=setTimeout("location.href='order.php?cmd=logout&display=timeout'",1200)>
<p>Session timed out. Progress saved. Redirecting...</p> <? }
 }











// stage 6: legal info
if($stage == "6") { ?>
<form method="post" action="order.php?stage=save6">
<p>You're almost done! In order to complete an order, you must understand and agree to the following terms and conditions:</p>
<p><b>I: Inspection of Work Upon Completion</b></p>
<p>Upon completion of work on your website, you must fully inspect it for any bugs, glitches or other errors. If you deem it 'error-free' I am no longer responsible for errors which are discovered in the future.</p>
<p>By clicking 'I agree' below, I accept all of the terms and conditions listed above.</p>
<input type="hidden" name="refer" value="<? echo $refer; ?>">
<input type="submit" value="I AGREE">
<input type="button" value="I DO NOT AGREE" onClick="window.location='order.php';">
</form>
<? }



//save6
if($stage == "save6") {

$sql = "UPDATE weborder SET finished6='1' WHERE username_3='$s_username'";
$result = mysql_query($sql);
if($refer !== "logout") { ?>
<body onload=setTimeout("location.href='order.php?stage=<? if(strlen($refer) > 0) { echo $refer; } if(strlen($refer) == 0) { echo "7"; } ?>'",1200)>
<p>Entries saved successfully. Continuing...</p> <? }
if($refer == "logout") { 
$sql = "UPDATE weborder SET finished6='0' WHERE username_3='$s_username'"; ?>
<body onload=setTimeout("location.href='order.php?cmd=logout&display=timeout'",1200)>
<p>Session timed out. Progress saved. Redirecting...</p> <? }
 }








//stage 7: confirm 
if($stage == 7) {
$sql2 = mysql_query("SELECT * FROM weborder WHERE username_3 = '$s_username'");
while($f=mysql_fetch_array($sql2))
{
$color_1 = $f["color_1"];
$logo_1 = $f["logo_1"];
$logo_info_1 = $f["logo_info_1"];
$feel_1 = $f["feel_1"];
$splash_1 = $f["splash_1"];
$other_1 = $f["other_1"]; 
$divisions_2 = $f["divisions_2"];
$multimedia_2 = $f["multimedia_2"];
$dynamic_2 = $f["dynamic_2"];
$title_2 = $f["title_2"];
$meta_2 = $f["meta_2"];
$footer_2 = $f["footer_2"];
$otherusername_3 = $f["otherusername_3"];
$otherpassword_3 = $f["otherpassword_3"];
$email_3 = $f["email_3"];
$stats_3 = $f["stats_3"];
$domain_3 = $f["domain_3"];
$security_3 = $f["security_3"];
$admin_3 = $f["admin_3"];
$hosting_3 = $f["hosting_3"];
$use_4 = $f["use_4"];
$audience_4 = $f["audience_4"];
$link_4 = $f["link_4"];
$advertising_4 = $f["advertising_4"];
$security_4 = $f["security_4"];
$first_5 = $f["first_5"];
$last_5 = $f["last_5"];
$phone_5 = $f["phone_5"];
$cell_5 = $f["cell_5"];
$email_5 = $f["email_5"];
$address_5 = $f["address_5"];
$city_5 = $f["city_5"];
$region_5 = $f["region_5"];
$country_5 = $f["country_5"];
$postal_5 = $f["postal_5"];
$company_5 = $f["company_5"];
$position_5 = $f["position_5"];
$skill_5 = $f["skill_5"]; ?>
<p>Please review all of the information you entered, correcting any errors, and then click "Complete" to submit the form to me and to finish your order.</p>
<form method="post" action="order.php?stage=save7">
<? // personal ?>
<table style="font-size: 10px; width: 500px;">
<tr><td colspan=4 style="text-align: center;"><b>Personal Info</b><br><br></td></tr>
<tr><td>First Name:</td><td><? echo $first_5; ?></td>
<td>Last Name:</td><td><? echo $last_5; ?></td></tr>
<tr><td>Phone:</td><td><? echo $phone_5; ?></td>
<td>Cell:</td><td><? echo $cell_5; ?></td></tr>
<tr><td>Email:</td><td><? echo $email_5; ?></td><td><br><br></td></tr>
<tr><td>Address:</td><td><? echo $address_5; ?></td>
<td>City:</td><td><? echo $city_5; ?></td></tr>
<tr><td>Province:</td><td><? echo $region_5; ?></td>
<td>Country:</td><td><? echo $country_5; ?></td></tr>
<tr><td>Postal Code:</td><td><? echo $postal_5; ?></td>
<td><br><br></td></tr>
<tr><td>Company:</td><td><? echo $company_5; ?></td>
<td>Position:</td><td><? echo $position_5; ?></td></tr>
<tr><td>Computer Skill:</td><td><? echo $skill_5; ?></td><td><br><br></tr>
<tr><td colspan=4 style="text-align: center;"><a href="order.php?stage=5&refer=7">Edit Personal Info</a><br><br><hr><br><br></td></tr>

<? //design ?>
<tr><td colspan=4 style="text-align: center;"><b>Design Information</b><br><br></td></tr>
<tr><td>Color Scheme:</td><td colspan=3><? echo $color_1; ?></td></tr>
<? if(strlen($logo_1) > 0) { ?><tr><td>Current Uploaded Logo:</td><td colspan=3><a href="upload/<? echo $s_username; ?>_logo.<? echo $logo_1; ?>" target="logo">View</a></td></tr><? } ?>
<tr><td>Logo Information:</td><td colspan=3><? echo $logo_info_1; ?></td></tr>
<tr><td>Feel:</td><td colspan=3><? echo $feel_1; ?></td></tr>
<tr><td>Splash Page:</td><td colspan=3><? echo $splash_1; ?></td></tr>
<tr><td>Other:</td><td colspan=3><? echo $other_1; ?></td></tr>
<tr><td colspan=4 style="text-align: center;"><a href="order.php?stage=1&refer=7">Edit Design Information</a><br><br><hr><br><br></td></tr>


<? //content ?>
<tr><td colspan=4 style="text-align: center;"><b>Content Information</b><br><br></td></tr>
<tr><td>Divisions:</td><td colspan=3><? echo $divisions_2; ?></td></tr>
<tr><td>Multimedia:</td><td colspan=3><? echo $multimedia_2; ?></td></tr>
<tr><td>Dynamic:</td><td colspan=3><? echo $dynamic_2; ?></td></tr>
<tr><td>Title:</td><td colspan=3><? echo $title_2; ?></td></tr>
<tr><td>Keywords:</td><td colspan=3><? echo $meta_2; ?></td></tr>
<tr><td>Footer:</td><td colspan=3><? echo $footer_2; ?></td></tr>
<tr><td colspan=4 style="text-align: center;"><a href="order.php?stage=2&refer=7">Edit Content Information</a><br><br><hr><br><br></td></tr>


<? //admin ?>
<tr><td colspan=4 style="text-align: center;"><b>Admin Options</b><br><br></td></tr>
<tr><td>Secondary Username:</td><td colspan=3><? echo $otherusername_3; ?></td></tr>
<tr><td>Secondary Password:</td><td colspan=3><? if(strlen($otherpassword_3) > 0) { echo 'Password Set'; } 
if(strlen($otherpassword_3) == 0) { echo 'Password Not Set'; } ?></td></tr>
<tr><td>Email:</td><td colspan=3><? echo $email_3; ?></td></tr>
<tr><td>Stats:</td><td colspan=3><? echo $stats_3; ?></td></tr>
<tr><td>Domain:</td><td colspan=3><? echo $domain_3; ?></td></tr>
<tr><td>Developing Security:</td><td colspan=3><? echo $security_3; ?></td></tr>
<tr><td>Admin Area:</td><td colspan=3><? echo $admin_3; ?></td></tr>
<tr><td>Hosting:</td><td colspan=3><? echo $hosting_3; ?></td></tr>
<tr><td colspan=4 style="text-align: center;"><a href="order.php?stage=3&refer=7">Edit Admin Options</a><br><br><hr><br><br></td></tr>


<? //other ?>
<tr><td colspan=4 style="text-align: center;"><b>Other Options</b><br><br></td></tr>
<tr><td>Usage:</td><td colspan=3><? echo $use_4; ?></td></tr>
<tr><td>Audience:</td><td colspan=3><? echo $audience_4; ?></td></tr>
<tr><td>Security:</td><td colspan=3><? echo $security_4; ?></td></tr>
<tr><td>Link to PWS:</td><td colspan=3><? echo $link_4; ?></td></tr>
<tr><td>Advertising:</td><td colspan=3><? echo $advertising_4; ?></td></tr>
<tr><td colspan=4 style="text-align: center;"><a href="order.php?stage=4&refer=7">Edit Other Options</a><br><br><hr><br><br></td></tr>
</table>

<input type="submit" value="Complete">
<?
}
}




//save7
if($stage == "save7") {

$timezone  = -8;
$time_7 = gmdate("g:i A", time() + 3600*($timezone+date("I")));
$date_7 = gmdate("M d/y", time() + 3600*($timezone+date("I")));

$sql = "UPDATE weborder SET date='$date_7',time='$time_7',finished7='1' WHERE username_3='$s_username'";
$result = mysql_query($sql);
$info = 'A client has ordered a website.';
mail("paqman@paqmanweb.com", "New Order", "$info", "From: PS Automail"); 
if($refer !== "logout") { ?>
<body onload=setTimeout("location.href='order.php?stage=<? if(strlen($refer) > 0) { echo $refer; } if(strlen($refer) == 0) { echo "8"; } ?>'",1200)>
<p>Form completed successfully! Redirecting...</p> <? }
if($refer == "logout") { 
$sql = "UPDATE weborder SET finished7='0' WHERE username_3='$s_username'"; ?>
<body onload=setTimeout("location.href='order.php?cmd=logout&display=timeout'",1200)>
<p>Session timed out. Progress saved. Redirecting...</p> <? }
 }


//completed message
if($stage ==  { ?>
<p>Congratulations! You've ordered a website. Give me a few days to get everything together and I'll email you with more information. Thank you and I hope to talk to you soon!</p><? }










***** says the next bracket is unexpected

// end session
}





?>
It happened when I added

Code: Select all

if($refer == "logout") { 
$sql = "UPDATE weborder SET finished1='0' WHERE username_3='$s_username'"; ?>
<body onload=setTimeout("location.href='order.php?cmd=logout&display=timeout'",1200)>
<p>Session timed out. Progress saved. Redirecting...</p> <? }
 }
to each 'save' section of code.
Thanks!

Re: can't find the error

Posted: Wed Aug 23, 2006 7:08 pm
by volka
paqman wrote:if($refer == "logout") {
$sql = "UPDATE weborder SET finished1='0' WHERE username_3='$s_username'"; ?>
<body onload=setTimeout("location.href='order.php?cmd=logout&display=timeout'",1200)>
<p>Session timed out. Progress saved. Redirecting...</p> <? }
}

Posted: Wed Aug 23, 2006 10:40 pm
by paqman
Sorry, I shouldn't have jsut posted that. THe second bracket closes the entire thing, like

Code: Select all

if($stage == "save7") {

$timezone  = -8;
$time_7 = gmdate("g:i A", time() + 3600*($timezone+date("I")));
$date_7 = gmdate("M d/y", time() + 3600*($timezone+date("I")));

$sql = "UPDATE weborder SET date='$date_7',time='$time_7',finished7='1' WHERE username_3='$s_username'";
$result = mysql_query($sql);
$info = 'A client has ordered a website.';
mail("paqman@paqmanweb.com", "New Order", "$info", "From: PS Automail");
if($refer !== "logout") { ?>
<body onload=setTimeout("location.href='order.php?stage=<? if(strlen($refer) > 0) { echo $refer; } if(strlen($refer) == 0) { echo "8"; } ?>'",1200)>
<p>Form completed successfully! Redirecting...</p> <? }
if($refer == "logout") {
$sql = "UPDATE weborder SET finished7='0' WHERE username_3='$s_username'"; ?>
<body onload=setTimeout("location.href='order.php?cmd=logout&display=timeout'",1200)>
<p>Session timed out. Progress saved. Redirecting...</p> <? }
 }

Posted: Thu Aug 24, 2006 2:22 am
by volka
Ok, then what about
//completed message
if($stage == 8) { ?>
<p>Congratulations! You've ordered a website. Give me a few days to get everything together and I'll email you with more information. Thank you and I hope to talk to you soon!</p><? }










***** says the next bracket is unexpected

// end session
}
?
indent your code and this does not happen or is easier to find.