i created one radio button and one user select so that when user selects radio whose values coming from database after that if he submit the page withoust selecting user it will locate to diff. page, but i dont no its not working in my case
Code: Select all
<form action="diradmin.php" method="post">
<? foreach($tree as $r) { ?>
<input type="radio" name="ddir" value="<?=$r->sys_pk ?>" id="<?="dir{$r->sys_pk}" ?>" />
<? } ?>
user
<select name="user">
<option selected="selected">** Please select**</option>
<? foreach($users as $r) { ?>
<option value="<?=$r->sys_pk ?>"><?=htmlentities($r->name) ?></option>
<? } ?>
</select>
<input type="submit" name="modify" value="Modify" />
there is one lib php file in which all functions r defined
diradmin.php
<? $dir = './'; require($dir.'lib.php'); get_session(); ?>
if ($modify && $ddir)
{
if (!$user) {
send_location_die('dirmodify.php?id='.$ddir);
}
}
in lib.php
function send_location_die($location)
{
send_location($location);
die();
}
function send_location($location)
{
expire_header();
header("Location: ".$location);
flush();
}thanks in advance