1
<html>
<head>
<title>Find my Favorite Movie!</title>
</head>
<body>
<?php
echo “<a href='localhost/moviesite.php?favmovie=Inception'>Inception</a>";
?>
</body>
</html>

Getting the following error for the above code. Parse error: syntax error, unexpected 'href' (T_STRING), expecting ',' or ';' in C:\xampp\test\movie1.php on line 7

0

3 Answers 3

3

As you can see you have a litteral mistake in

echo “<a href='localhost/moviesite.php?favmovie=Inception'>Inception</a>";

couse != "

change it to:

echo "<a href='localhost/moviesite.php?favmovie=Inception'>Inception</a>";
Sign up to request clarification or add additional context in comments.

Comments

2
echo '<a href="localhost/moviesite.php?favmovie=Inception">Inception</a>';

Should do the trick for you

Comments

1

You have an copy and past error try this:

echo "<a href='localhost/moviesite.php?favmovie=Inception'>Inception</a>";

You are using by misstake a wrong quote instad of ". Often are quotes replaced wrong by some CMS like Wordpress. So you need to check double that you use the right quotes.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.