Jump to content

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


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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.