Jump to content

How to add "id=" to a conformation statement.


Matt Ridge

Recommended Posts

I have a script in where I need to push as a conformation, I have the script written...

 

echo '<p>Your comments have been successfully entered. Would you like to <a href="1-1.php' . $_GET['id'] . '">view the final report</a>?</p>';

 

The problem is that there is no '=' sign between the php and the ID... is there a way to make it so that it shows up?

You should pass variables using a name/value pair

echo "<p>Your comments have been successfully entered. Would you like to <a href=\"1-1.php?id={$_GET['id']}\">view the final report</a>?</p>";

 

First thing I tried, didn't work... This is what I got and now it works.

 

echo '<p>Your comments have been successfully entered. Would you like to <a href="1-1.php'. "?id=" . $_GET['id'] . '">view the final report</a>?</p>';

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.