Hi Guys :) erm Im not the biggest on Javascript its more like a second language unlike PHP and HTML erm anyway, I am trying to redirect users with Javascript, the reason I am using javascript is so that users don't see the URL, its more of a precaution on my part.
Anyway my problem is:
Users can have several rows (message system) and each row has a title saying 'private message from BLA' so each row equals a new row in the database meaning If there were four the url's of the rows would go like e.g.
message?id=1
message?id=2
message?id=3
etc...
But my javascript redirect is only compensating for one row so all my rows are going by the first row for that user..
Is there a way to make it redirect for multiple custom id/urls..
my current Javascript is basic:
<script language="JavaScript">
function onClick(event)
{
window.location = "console-view?id=<? echo"$find[id]"; ?>";
}
//-->
</script>
My Rows are done like so:
$user = $loggedin[name];
$mail = mysql_query("SELECT * FROM `messenger` WHERE `reciever`='$user' ORDER BY `id` DESC limit `8`");
while($find = mysql_fetch_array($mail)){ ?>
<div id="Arow"><a onclick="return onClick(href)">Private message from BLA</a>
<? } ?>
I am grateful for any help I receive,
thank you in advance!