Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2009
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help me-parse error

    when I try to excute the following code it gives me the followng error

    Parse error: syntax error, unexpected T_STRING contact_mass_email.php on line 8

    [CODE]
    <?php
    include('header.php');
    $subject = $HTTP_POST_VARS["subject"];
    $subject = stripslashes($subject);
    $content_1 = $HTTP_POST_VARS["content_1"];
    $content_1 = htmlentities($content_1, ENT_QUOTES);
    $content_1 = stripslashes($content_1);
    $content_1 = "<font face="arial"> ".
    $content_1 ." </font>";
    $myDb->connect();
    $SQL = mysql_query("SELECT email FROM yob_users");
    $myDb->close();
    while($row = mysql_fetch_array($SQL)){ $EmailAddress2[] = $row["email"];
    }
    $SITEEMAIL = $_POST['from'];
    ?>
    [ICODE]

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You need to escape double quotes. Also you are using deprecated stuff like HTTP_POST_VARS? Where have you been learning php? I suggest you find a different site.
    PHP Code:
    <?php
    include('header.php');
    $subject $_POST["subject"];
    $subject stripslashes($subject);
    $content_1 $_POST["content_1"];
    $content_1 htmlentities($content_1ENT_QUOTES);
    $content_1 stripslashes($content_1);
    $content_1 "<font face=\"arial\"> ";
    $content_1 .= " </font>";
    $myDb->connect();
    $SQL mysql_query("SELECT email FROM yob_users");
    $myDb->close();
    while(
    $row mysql_fetch_array($SQL))

    $EmailAddress2[] = $row["email"];
    }
    $SITEEMAIL $_POST['from'];
    ?>
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    May 2009
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i found the same error message

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Please post your new code and the code for header.php.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •