guymclaren Posted September 17, 2008 Share Posted September 17, 2008 I used to code ASP and PHP is doing my head in. I cannot see the problem here but it must exist <?php $coid = $_COOKIE["affiliate"]; if ($coid == NULL) { $myid = $_GET['aff']; if ($myid != NULL){ setcookie("affiliate","$myid"); } else { setcookie("affiliate","MCL01"); header('Location:http://webtech.co.za/website.php'); } if ($coid != NULL) { $aff = $coid; $name = $_GET['name']; if ($name != NULL) { $company = $_GET['company']; $domain = $_GET['domain']; $type = $_GET['type']; $address = $_GET['address']; $postal = $_GET['postal']; $tel = $_GET['tel']; $cell = $_GET['cell']; $fax = $_GET['fax']; $email = $_GET['email']; $pay = $_GET['payment']; /* INSERT INTO DATABASE SEND CONFIRMATION EMAIL TO CLIENT */ echo "Dear $name<br /><br /> Thank you for your order. Due to high levels of spam and in order to confirm your email address we have sent you a confirmation link to the email address you have given us. You will need to visit the link to finalise this transaction and receive payment details. <br /><br />Once we have received your confirmation, signed debit order and proof of payment we will reserve your domain name and install your website within 3 - 4 days."; } else { ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Website order page</title> </head> <body><div align="center"><table summary="" width="770"> <tr> <td> <h1>Buy Now</h1> <FORM NAME="order" METHOD=POST ACTION="order.php"> <table summary="" width="770"> <tr><td>Domain Name required</td><td><input type="text" name="domain" /></td></tr> <tr><td colspan="2"> <input type="submit" name="Submit Order" value="Order"></td></tr> </table> </form> </div> <?php } /* line 98 */ ?> Parse error: syntax error, unexpected $end in /var/www/vhosts/webtech.co.za/httpdocs/order.php on line 98 is my result Link to comment https://forums.phpfreaks.com/topic/124620-solved-if-if-if-else-else-why-do-you-hate-me/ Share on other sites More sharing options...
madspof Posted September 17, 2008 Share Posted September 17, 2008 Are you not misssing another else at teh end of your script ?? Link to comment https://forums.phpfreaks.com/topic/124620-solved-if-if-if-else-else-why-do-you-hate-me/#findComment-643622 Share on other sites More sharing options...
guymclaren Posted September 17, 2008 Author Share Posted September 17, 2008 Why would it need an else at the end of a script? That sounds illogical to me. basically I have if cookie aff is null then check if theres an aff link if there is make cookie with aff link or else make cookie with house link /* up to here it works. I know thats been tested. If there is a name then go to database and add (still to code) echo message about confirmation else open form if my logic is faulty please tell me why? Link to comment https://forums.phpfreaks.com/topic/124620-solved-if-if-if-else-else-why-do-you-hate-me/#findComment-643629 Share on other sites More sharing options...
ranjuvs Posted September 17, 2008 Share Posted September 17, 2008 Missing curly braces after the line header('Location:http://webtech.co.za/website.php'); Link to comment https://forums.phpfreaks.com/topic/124620-solved-if-if-if-else-else-why-do-you-hate-me/#findComment-643632 Share on other sites More sharing options...
guymclaren Posted September 17, 2008 Author Share Posted September 17, 2008 Thank You and I was missing another at the end. You are a star. Link to comment https://forums.phpfreaks.com/topic/124620-solved-if-if-if-else-else-why-do-you-hate-me/#findComment-643636 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.