hi all,
i hav a problem so in order to solve that i need to keep the radio button value in a session.but i am not getting it how to keep. so any can can say me..
Thank u.
<?php
ob_start();
@session_start();
require_once ("check.php");
include 'connection.php';
$query= mysql_query("SELECT projectassign FROM projectassign where userid=(select userid from users where username='$username' and role='2')");
mysql_error();
$num=mysql_num_rows($query);
?>
<head>
<body>
<link rel="stylesheet" type="text/css" href="style.css"/>
<script language="javascript" type="text/javascript">
function check()
{
if(document.getElementById('radio[]').value == "")
{
alert('Please select project');
return false;
}
}
</script>
<form>
<table width="100%">
<tr><td><img src="Logofinalcopy.gif">
</td></tr></table><br><hr style="color: red;">
<table align="right"><tr> <td></td>
<td align="right" style="color: navy;"><strong><?php echo "Welcome ".$_SESSION[username];?>,</strong></td><td><a href="Logout.php">Logout</a></td>
</tr></table>
<br><br>
<table border="1" cellspacing="0" cellpadding="0" align="center" style="width: 500px" bordercolor="red">
<tr>
<th></th>
<th style="color: navy;">Projectassign</th>
</tr>
<?php
$sno=1;
while($row=mysql_fetch_array($query, MYSQL_ASSOC)){
?>
<tr>
<td><input name="radio" type="radio" id="radio[]" checked="checked" value="<?php echo $row['projectassign'];?>"></td>
<td><?php echo $row['projectassign'];?></td>
</tr>
<?php
$sno=$sno+1;
}
?>
</table>
<table align="center"><td align="center">
<input type="submit" name="Submit" value="Submit"></td>
</table>
</body></head>