Okay, if I do it like this, it works.
PHP Code:
echo "<p>$name <a href=\"new.php?id=". $id ."\">". $title ."</a></p> \r\n";
// here's the new page that gets the id...
$id = $_GET['id'];
$sql = mysql_query("SELECT description FROM databasename WHERE id='$id'")
// make the sql query that shows the description based on that ID.
But, another question about it:
if you want to make the links doing other sql queries? Do you have to make two $_GET structures?
Or do you have to implement this:
PHP Code:
echo "<p>$name <a href=\"new.php?fun=quer2&id=". $id ."\">". $title ."</a></p> \r\n";
if($fun == "quer1" || $fun == "quer2" || $fun == "quer3") {
$fun();
function quer1() {
$id = $_GET['id']
$sql = mysql_query("SELECT description FROM databasename WHERE id='$id'")
// make the sql query that shows the description based on that ID.
}
and with the POST method?
Can you use the POST method only by forms? Or also by links?
Because I don't want the values in my url.
Something like this:
echo "<p>$name <a href=\"????\" value=\"new.php?fun=quer2&id=". $id ."\" method=\"post\">". $title ."</a></p> \r\n";
The rest:
$id = $_POST['id']
Bookmarks