emery Posted December 18, 2011 Share Posted December 18, 2011 I am getting this error Parse error: syntax error, unexpected '}', expecting ',' or ';' in /home/a6658518/public_html/view/register.php on line 83 <html> <body> <pre> <?php $Fname = $_POST["Fname"]; $Lname = $_POST["Lname"]; $mail = $_POST["mail"]; if (!isset($_POST['submit'])) { ?> <form method="post" action="<?php echo $PHP_SELF;?>"> First Name:<input type="text" size="12" maxlength="12" name="Fname"><br /> Last Name:<input type="text" size="12" maxlength="36" name="Lname"><br /> Email:<input type="text" size="12" maxlength="36" name="mail"><br /> This must be a valid email! <input type="submit" value="submit" name="submit"> </form> <? } else { if (isset($_COOKIE["dsc"])) { echo "Whoops! You already got a serial number!" } else { $myFile = $Fname; $myFile .= ".vl"; $myFile = $loca .= myFile$; if (file_exists($myFile)) { echo "We seem to have another serial key with that name already made! Please email emery.cairns@gmail.com if you think this is an error"; } else { $fh = fopen($myFile, 'w') or die("Whoops! I had an error, please contact my owner at emery.cairns@gmail.com, code: file unwriteable"); $stringData = getSerial(); fwrite($fh, $stringData); fclose($fh); echo "Hello, ".$Fname." ".$Lname.".<br />"; echo "Thanks for registering with us, the email with your serial key and name will show up in your inbox shortly!.<br />"; echo "Please make sure it does not end up in your junk mail!"; $expire=time()+60*60*24*60; setcookie("dsc", "Serial given within 60 days", $expire); $to = $mail; $serial = getSerial(); $subject = "Dhpos Self Checkout"; $message = "Hello!, your serial number for D.S.C is {$serial} and your name is {$Fname} Thanks for downloading DSC, we hope you enjoy the program. You recived this message because you requested a serial number from http://dhposselfcheckout.tk, if you did not, please disregard this message."; $from = "emery.cairns@gmail.com"; $headers = "From:" . $from; if ( $to == "emery.cairns@gmail.com" ) { echo "mail stop"; } else { mail($to,$subject,$message,$headers); } } } } ?> <br /> </pre> </body> </html> Link to comment https://forums.phpfreaks.com/topic/253412-confused/ Share on other sites More sharing options...
trq Posted December 18, 2011 Share Posted December 18, 2011 If you indent your code so it is readable you might find the error. Or you might at least attract help. Personally, if I see code formatted like that, I usually just hit the back button. Link to comment https://forums.phpfreaks.com/topic/253412-confused/#findComment-1298968 Share on other sites More sharing options...
floridaflatlander Posted December 18, 2011 Share Posted December 18, 2011 Where is line 83? Usually the problem will be around line 83, a missing , or ; somewhere north of that line. Link to comment https://forums.phpfreaks.com/topic/253412-confused/#findComment-1298971 Share on other sites More sharing options...
emery Posted December 18, 2011 Author Share Posted December 18, 2011 Its working now Link to comment https://forums.phpfreaks.com/topic/253412-confused/#findComment-1298977 Share on other sites More sharing options...
emery Posted May 16, 2012 Author Share Posted May 16, 2012 Please remove this, or atleast all code or words regarding "Dhpos Self Checkout" Regards, Emery Link to comment https://forums.phpfreaks.com/topic/253412-confused/#findComment-1346151 Share on other sites More sharing options...
trq Posted May 17, 2012 Share Posted May 17, 2012 Please remove this, or atleast all code or words regarding "Dhpos Self Checkout" Regards, Emery Have a look above the Post / Preview buttons. Link to comment https://forums.phpfreaks.com/topic/253412-confused/#findComment-1346208 Share on other sites More sharing options...
Recommended Posts