所以基本上我真的不知道如何解释我需要什么,或者标题是否正确,但我需要一些帮助。我会尽我所能解释我正在努力做的事情。
这是我正在处理的页面的图片,参考 http://i40.tinypic.com/14m5euh.png。
所以基本上我需要做的是,当用户上传文件并点击它时,upload
它会database
与.job number
database
但我无法进入job number
,database
因为我的信息全部array
来自database
我试图将信息存储到一个session variable
,它的循环并被下一个替换,所以基本上最后一个job number
将存储在database
其中原因是错的?
我遇到的最后一个问题是,我如何让用户的答案从drop down box
进入 a variable
?
我的代码:
$con = mysqli_connect("localhost", "root", "","fixandrun") or die(mysqli_error());
$data = mysqli_query($con,"SELECT * FROM bookjob") or die(mysql_error());
Print "<table border cellpadding=10>";
Print "<table border='2'>";
echo "<table border='2' cellpadding=10>
<tr>
<th> Job number</th>
<th> Job details</th>
<th> Pc number </th>
<th> Job status</th>
<th> Upload report</th>
<th> Update Job</th>
</tr>";
while($row= mysqli_fetch_array($data))
{
echo "<tr>";
echo "<td>".$_SESSION['JOBNUM'] = $row['jobnumber'] . "</td>";
echo "<TD width=20% height=100>" . $row['jobdetails'] . "</td>";
echo "<td>" . $row['pcnumber'] . "</td>";
echo "<td> <select name='jobprogress'>
<option Value='pending'>pending</option>
<option value='Completed'>Completed</option>
<option value='In progress'>In progress</option>
<option value='Need more information'>Need more information</option>
</select> </td>";
echo "<td> <form action='reportupload.php' method='post' enctype='multipart/form-data' name='uploadform'>
<input type='hidden' name='MAX_FILE_SIZE' value='350000'>
<input name='report' type='file' id='reportupload' size='50'>
<input name='upload' type='submit' id='upload' value='Upload'>
</form>
</td>";
echo "<td> <a href='updateadmin.php'>Update information</a></td>";
echo "</tr>";
}
echo "</table>";
echo "<br>";