NickG21 Posted December 28, 2006 Share Posted December 28, 2006 hey everyone, this code has been working fine for me all day and i just added another variable to validate and now i get this error:Parse error: parse error, unexpected '>' in .../ContactUs.php on line 75Line 75 is the line that echoes whatever was stored in the $error[] array.any idea what is going on with this?? thank you[code]<?phpfunction checkEmail($email) { if(eregi("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$]", $email)) { return FALSE; } list($Username, $Domain) = split("@",$email); if(getmxrr($Domain, $MXHost)) { return TRUE; } else { if(@fsockopen($Domain, 25, $errno, $errstr, 15)) { return TRUE; } else { return FALSE; } }}function redirect($filename=".?op=main",$delay="0",$die="0"){ if((!headers_sent())&&($delay=="0")) header('Location: '.$filename); elseif($delay=="0"){ echo '<script type="text/javascript">'; echo 'window.location.href="'.$filename.'";'; echo '</script>'; echo '<noscript>'; echo '<meta http-equiv="refresh" content="0;url='.$filename.'" />'; echo '<noscript>'; }else echo '<meta http-equiv="refresh" content="'.$delay.';url='.$filename.'" />'; if($die=="0") exit;}if (isset($_POST['submit'])) { $company = $_POST['CompanyName']; $name = $_POST['YourName']; $email = $_POST['YourEmailAddress']; $domainName = $_POST['ListOrDomainName']; $username = $_POST['Username']; $password = $_POST['Password']; $credit = $_POST['CreditCardNumber]; $error = array(); if (empty($company)) { $error[] = "Comapny"; }if (empty($name)) { $error[] = "Your Name"; }elseif (!preg_match("/^([a-zA-Z])+/",$name)) { $error[] = "Your Name"; $name=""; }if(checkEmail($email) == FALSE) { $error[]="E-Mail Address"; $email = "";} if(empty($username)) { $error[] = "User Name"; }if(empty($password)){ $error[]="Password";}elseif (strlen($password) < 6) { $error[]= "Password Must Contain At Least Six Characters";}if(empty($credit)){ $error[]="Credit Card Number"; } elseif(!preg_match("/^([0-9])+/",$credit)) { $error[] = "Invalid Credit Card Number"; }if(count($error) > 0) { echo "<big><b>The Following Errors Were Found, Please Re-Enter:</b></big><br/>". implode('<br/>', $error). "</p>"; } else { header('Location: ./Thanks.php'); exit; }}?>[/code] Link to comment https://forums.phpfreaks.com/topic/32084-solved-no-idea-where-the-problem-is/ Share on other sites More sharing options...
kenrbnsn Posted December 28, 2006 Share Posted December 28, 2006 You're missing a terminating single quote on this line:[code]<?php$credit = $_POST['CreditCardNumber];?>[/code]Ken Link to comment https://forums.phpfreaks.com/topic/32084-solved-no-idea-where-the-problem-is/#findComment-148900 Share on other sites More sharing options...
drifter Posted December 28, 2006 Share Posted December 28, 2006 $_POST['CreditCardNumber];you are missing a ' - messes up everything all the way down... look at the code high lighting in this thread - that is how I found it. Link to comment https://forums.phpfreaks.com/topic/32084-solved-no-idea-where-the-problem-is/#findComment-148902 Share on other sites More sharing options...
NickG21 Posted December 28, 2006 Author Share Posted December 28, 2006 wow, thanks a lot guys that's what i call a nice amateur mistake Link to comment https://forums.phpfreaks.com/topic/32084-solved-no-idea-where-the-problem-is/#findComment-148905 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.