Jump to content

[SOLVED] ECHO Statement not working with HTML


vajra_hendry

Recommended Posts

Hi guys, could you please help.  Nearly finished now but I the last echo statement at the end of the IF statement wont work!!

 

else
{
        /* $destination = 'uploads/'.'\\'.$_FILES['pix']['name']; */
        $destination = "uploads/";
$destination = $destination . basename( $_FILES['pix']['name']);
        $temp_file = $_FILES['pix']['tmp_name'];
        move_uploaded_file($temp_file,$destination);
        echo "<p><b>Ok it worked man. File uploaded:</b>";
        echo $_FILES['pix']['name'];
        echo $_FILES['pix']['size'];
#line 69       echo "<p>ok so if your happy with that then click <a href="review.php">here</a> to go to the review screen";

}
}

?>

 

The error is :

 

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/learnth1/public_html/steptwo.php on line 69

simple

 

 

change

       echo "<p>ok so if your happy with that then click <a href="review.php">here</a> to go to the review screen";

 

into:

       echo "<p>ok so if your happy with that then click <a href=\"review.php\">here</a> to go to the review screen";

 

echo "<p>ok so if your happy with that then click <a href=\"review.php\">here</a> to go to the review screen";

 

You can either escape the double quotes (or they'll terminate the string that echo is expecting), or replace the double quotes with singles. Either way works.

 

And please don't start a whole new topic for the last problem with a topic you already have for the remainder of your code.

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.