0
echo '<a href="LP_Teacher_Response_G4.php Lesson_id=$Lesson_id&user_id=$user_id&Lesson_Class_id=$Lesson_Class_id&class_id=$class_id">
    <img height="62" src="../Images/Lock.png" width="76" /></a>';

Hi,

I am not sure why my parameters do not show in the link, instead it outputs the code statement, played around with it but not sure what needs to be done.

  • File extension needs to be `.php` with an opening tag ` – nice_dev Oct 05 '21 at 04:34
  • Try `LP_Teacher_Response_G4.php?Lesson_id='.$Lesson_id.'&user_id='.$user_id.'` – Robert Oct 05 '21 at 05:42
  • 1
    See this question to understand your problem: https://stackoverflow.com/questions/3446216/what-is-the-difference-between-single-quoted-and-double-quoted-strings-in-php – Robert Oct 05 '21 at 05:47
  • Does this answer your question? [What is the difference between single-quoted and double-quoted strings in PHP?](https://stackoverflow.com/questions/3446216/what-is-the-difference-between-single-quoted-and-double-quoted-strings-in-php) – kmoser Oct 05 '21 at 06:21

1 Answers1

0

Try this way

echo "<a href=\"LP_Teacher_Response_G4.php?Lesson_id=$Lesson_id&user_id=$user_id&Lesson_Class_id=$Lesson_Class_id&class_id=$class_id\"><img height=\"62\" src=\"../Images/Lock.png\" width=\"76\" /></a>";
Mainul Hasan
  • 691
  • 3
  • 12