Jump to content

unexpected ';' in C:\xampp\htdocs\iSing\affiliate_true.php on line 23 Cant Find?


Modernvox

Recommended Posts

Hi Guyz,

 

Can anyone see this error in the code? Cause I've been looking for a while now.

<?php
if(isset($_POST['submit'])) 
if(isset($_POST['name']))
if(isset($_POST['address']))


$email = ($_POST['email'];
$name = ($_POST['name'];
$details = ($_POST['comments'];

$pattern = '/^[a-z0-9]{4,}+.?([a-z0-9]+)?@([a-z0-9]+\.)+[a-z]{3,4}$/i';
if (preg_match($pattern, $email)) {
     echo "message here";
} else {
    echo "You have entered an invalid email address";
return 1;
}


$to = 'myaddress';
$subject = 'You have an affiliate inquiry';
$msg = "$name $email $details";
mail($to, $subject, $msg, 'From:' . $email);

?>

 

<?php
$email = ($_POST['email']); //You forgot the ')' Duh! 
$name = ($_POST['name']);
$details = ($_POST['comments']);
?>

 

Damn...I am really am dumb as shit!!!!  Thanks Guyz! :shrug:

 

No problem! :P Just part of programming.

 

I'd recommend you download an IDE for PHP (such as NetBeans), They're free and can list PHP errors, as well as highlight your code to show obvious syntax errors.

 

<?php
$email = ($_POST['email']); //You forgot the ')' Duh! 
$name = ($_POST['name']);
$details = ($_POST['comments']);
?>

 

Damn...I am really am dumb as shit!!!!  Thanks Guyz! :shrug:

 

No problem! :P Just part of programming.

 

I'd recommend you download an IDE for PHP (such as NetBeans), They're free and can list PHP errors, as well as highlight your code to show obvious syntax errors.

 

Will do. TY

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.