Jump to content

Passing a Variable through a URL.


Monk3h

Recommended Posts

This is driving me MAD!

 

The Variable gets passed through the URL but when I try and echo the result I gte NOTHING.

 

First Page.

 

<?php include'config.php';


$result = mysql_query("SELECT * FROM carbontrust");

while($entry = mysql_fetch_array($result))


Print "$entry[contact] - $entry[company] :: <a href='edit.php?id=$entry[id]'>Edit</a><br>";

exit;

?>

 

 

 

Second Page. (Where I want the Variable passed to)

<?php include'config.php';


$id = $_GET['id'];
echo "ID: $id";


}


?>

 

 

Its probably just a stupid error but iv looked through a load of tutorials and this should be correct. :/

Link to comment
https://forums.phpfreaks.com/topic/222201-passing-a-variable-through-a-url/
Share on other sites

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.