Sending a variable with a url

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 28
Joined: Fri Jan 03, 2003 4:00 pm

Mon Feb 10, 2003 8:17 am

echo "<TR bgcolor=\"#f0f0f0\">\n";
echo "
<TD><a href=update.php?id=".$row['ID'].">".$row['ID']."</a></TD>
echo "</TR>\n";

New php-forum User
New php-forum User
Posts: 26
Joined: Thu Jan 16, 2003 6:05 am

Mon Feb 10, 2003 8:32 am

I had the same problem last week and took me ages to figure out how to call the variable into the file once it was in the url so just incase it helps use the $_GET command to retrieve the id from the address. kinda like this.

if(isset($_GET['id']) && $_GET['id'] !== "")//checks it is set and not blank
$id = ($_GET['id']);

Post Reply