Hello.
So i have this script:
<?php
$query = mysql_query("
SELECT meetup AS text, id AS theID, dato FROM member_meetups WHERE username = '$pusername' UNION
SELECT navn AS text, id AS theID, dato FROM member_film WHERE username = '$pusername' UNION
SELECT title AS text, id AS theID, dato FROM member_tutorials WHERE username = '$pusername'
ORDER BY dato DESC
LIMIT 5;
");
while ($row = mysql_fetch_assoc($query)) { echo $row['theID'].' - '. $row['text'] . ' - ' . $row['dato']."<br>"; }
?>
which is showing data from the 3 queries with $row['text'], and then the id as $row['theID']
Now, i have ran into an issue, because i want to make links.. First i thought i could do this:
<a href='show.php?id=<? echo $row['theID']; ?>'><? echo $row['text'] . ' - ' . $row['dato']."</a><br>";
But i cant in my situation, because i have member_meetups show.php at meetups/show.php, and tutorials at tutorial/show.php and film at film/show.php..
So if i link it as e.g film/show.php?id=$row['id'] , it wont go to the right link if you press on $row['text'] there is from member_tutorial..
How should i solve this?