Location: PHPKode > projects > ERPSOD > erpsod/usertask.php
$userid=$_SESSION ["suser"];

$sql="select logonid,name from erpuser where erpuserid=$userid";
$result = mysql_query($sql);
$num_rows = mysql_num_rows($result);
if ($num_rows <>0){
	$row = mysql_fetch_row($result);
	$logonid= $row[0];
	$name = $row[1];
} else {
   die('Could not find task');
$sql = "select * from usertask where erpuserid=$userid "; 
$result = mysql_query($sql);
$size = mysql_num_rows($result);
if ($size == 0){
	$size=1 ;
} else {

$sql= "CREATE TEMPORARY TABLE ERPSOD select erptask.taskid,taskname,taskdesc from erptask,usertask where usertask.taskid=erptask.taskid and usertask.erpuserid=$userid order by taskname"; 
$result = mysql_query($sql);
// $num_rows = mysql_num_rows($result);
if (!$result) {
    die('Problem with this query: ' . $sql);
<link rel="stylesheet" type="text/css" href="<?PHP echo $style ?>">
<script language="JavaScript1.2" src="js/coolmenus4.js">
<body bgcolor="#ffffff">
<script language="JavaScript1.2" src="js/erpsod.js">
<FORM ACTION="usertask1.php?form=usertask"  METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="ID" VALUE="<?PHP echo $userid ?>">
<B>Assigned tasks for :</b>
echo $logonid;
echo "-->";
echo $name ;?>
<table border=1 cellpadding=0 cellspacing=0 bgcolor="AQUA"><tr><td>
<table border=0 cellpadding=10 cellspacing=0>
<td valign="top">
<?PHP echo html_drop_down ($size,"tasklist","erpsod","taskid","taskname","taskid","","","","taskdesc"); ?>

<td valign="bottom">
<INPUT TYPE="SUBMIT" NAME="command" VALUE="Done" style="width: 80px;"><br>
<?php if (role_check("Updater")) { ?>
<INPUT TYPE="SUBMIT" NAME="command" VALUE="Add" style="width: 80px;"><br>
<INPUT TYPE="SUBMIT" NAME="command" VALUE="Delete" style="width: 80px;" ONCLICK="return confirm('Delete selected Task?')"><br>
<?PHP } ?>
Return current item: ERPSOD