Yeah I want to view number not just 'a 'by using $_Get['val']
What should I do?
this is the whole code for the home page I want to send the value to next page.
<?php session_start();
include"connect.php";
echo "<html>
<head>
<script language='JavaScript'><!--
function clicked(a)
{
window.location.href='msg.php?val='$a;;
}
// --></script>
</head>";
echo "<table width='100%' border='0'>
<tr>
<td width='83%' height='22'> <div align='right'><strong><a href='messages.php'><font color='#000099'>Message
Archieve</font></a></strong></div></td>
<td width='17%'><div align='right'><a href='logoff.php'><strong>Sign Out</strong></a></div></td>
</tr>
</table>";
echo"<table width='100%' height='38' border='0'>
<tr bgcolor='#330099'>
<td width='12%' height='64'><font color='#FFFFFF'> </font>
<form name='form1' method='post' action=''>
<input type='submit' name='Submit' value='Delete' onClick=delete(form.checkbox.value)>
<input type='submit' name='Submit2' value='Clear'>
</td>
<td width='69%'><div align='center'><font color='#FFFFFF'><strong>Message</strong></font></td>
<td width='19%'><div align='center'><font color='#FFFFFF'><strong>DATE</strong></font></td>
</tr>
</table>";
$query = "select user_id from users where user_name = '".$SESSION['user_name']."'";
$result= mysql_query($query);
if(result)
{ while($row = mysql_fetch_array($result,MYSQL_NUM))
{ $user_id = $row[0];
} mysql_free_result($result);
}
else {echo "user id not found";
}
$query = "select sender_id,message,DATE_FORMAT(date_posted,'%M %d,%Y %r') from ".$SESSION['user_name']."_message where reciever_id = '$user_id' AND view = 1 ORDER BY date_posted DESC";
$result1= mysql_query($query);
if(result1)
{
while($row = mysql_fetch_array($result1,MYSQL_NUM))
{
$sender= $row[0];
$m = $row[1];
$d= $row[2];
$query = "select user_name from users where user_id ='$sender'";
$r=mysql_query($query);
if($r)
{
while($row=mysql_fetch_array($r,MYSQL_NUM))
{ $s = $row[0];
}
mysql_free_result($r);}
else {echo" There is no sender";}
echo"
<table width='100%' border='0'>
<tr>
<td width='25%'><div align='left'>
<input type='checkbox' name='checkbox' value='checkbox'>
</form>
<a href=\"#\"><img src='images\J.JPG' width='40' height='47' border='0' onclick = \"clicked($sender);\" ></a></div></td>
<td width='64%'><div align='left'>".$s." has sent you a new message. </td>
<td width='19%'><div align='left'>".$d."</td>
</tr>
</table>";
} mysql_free_result($result1);}
else {echo "There is somethhing wrong";}
?>
</html>