Sending a variable with a url

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
Tony121076
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>
<TD>".$row['Unit']."</TD><TD>".$row['POC']."</TD>
<TD>".$row['Date']."</TD><TD>".$row['Start']."</TD>\n";
echo "</TR>\n";

flash_harry
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
  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests