while($row = mysql_fetch_array($result))
{
$id = $row['id'];
$compname = $row['compname'];
$assetnum = $row['assetnum'];
$model = $row['model'];
$cuser = $row['cuser'];
$location = $row['location'];
$warranty = $row['warranty'];
$os = $row['os'];
$ipaddr = $row['ipaddr'];
$mem = $row['mem'];
$serial = $row['serial'];
$notes = $row['notes'];
echo "<table width=75% align=left border=2>
<tr bgcolor=#045FB4><th>Computer name</th>
<th>Asset Number</th>
<th>Model</th>
<th>Current User</th>
<th>Location</th>
<th>Warranty</th>
<th>Operating System</th>
<th>IP address</th>
<th>Memory</th>
<th>Serial</th></tr>";
echo "<tr><td><input type=\"text\" name=\"compname\" value=\"$compname\" size=\"10\" readonly=\"readonly\"/></td>";
echo "<td> <input type=\"text\" name=\"assetnum\" value=\"".$row['assetnum']."\" size=\"6\" readonly=\"readonly\"/></td>";
echo "<td> <input type=\"text\" name=\"model\" value=\"".$row['model']."\" size=\"10\" readonly=\"readonly\"/</td>";
echo "<td> <input type=\"text\" name=\"cuser\" value=\"".$row['cuser']."\" size=\"10\" readonly=\"readonly\"/></td>";
echo "<td> <input type=\"text\" name=\"location\" value=\"".$row['location']."\" size=\"10\" readonly=\"readonly\"/></td>";
echo "<td><input type=\"text\" name=\"warranty\" value=\"".$row['warranty']."\" size=\"8\" readonly=\"readonly\"/></td>";
echo "<td> <input type=\"text\" name=\"os\" value=\"".$row['os']."\" size=\"10\" readonly=\"readonly\"/>";
echo "<td> <input type=\"text\" name=\"ipaddr\" value=\"".$row['ipaddr']."\" size=\"10\" readonly=\"readonly\"/></td>";
echo "<td> <input type=\"text\" name=\"mem\" value=\"".$row['mem']."\" size=\"6\" readonly=\"readonly\"/></td>";
echo "<td> <input type=\"text\" name=\"serial\" value=\"".$row['serial']."\" size=\"8\" readonly=\"readonly\"/></td>";
echo " <a href=\"edit.php?compnam=\"".$row['compname']."\">";
echo "<a href=\"edit.php?id=$id&compname=$compname&assetnum=$assetnum&model=$model&cuser=$cuser&location=$location&warranty=$warranty&os=$os&ipaddr=$ipaddr&mem=$mem&serial=$serial¬es=$notes\">$id</a>";
}
mysql_free_result($result);
}
?>
</body>
</html>
<body> <?php $_REQUEST['compname'];?> <form method="post" action="editdb.php"> <input type="submit" value="Edit"> <input type="submit" value="Save"> <input type="submit" value="Print"> <div id="datafield"> Computer Name<br /> <input type=text name=compname size=10 maxlength=100 value="<?php $_REQUEST['compname'];?>"> <input type=text name=assetnum size=10 maxlength=100 value="<?php echo $assetnum;?>" /> <input type=text name=model size=10 maxlength=100 value="<?php echo $model;?>" /> <br /><br /> <input type=text name=cuser size=10 maxlength=100 value="<?php echo $cuser;?>" /> <input type=text name=location size=10 maxlength=100 value="<?php echo $location;?>" /> <input type=text name=warranty size=10 maxlength=100 value="<?php echo $warranty;?>" /> <br /><br /> <input type=text name=os size=10 maxlength=100 value="<?php echo $os;?>" /> <input type=text name=ipaddr size=10 maxlength=100 value="<?php echo $ipaddr;?>" /> <input type=text name=mem size=10 maxlength=100 value="<?php echo $mem;?>" /> <input type=text name=serial size=10 maxlength=100 value="<?php echo $serial;?>" /> <br /><br /><br /><br />Notes<br /> <textarea cols=80 rows=15 name=notes value="><?php echo $notes;?>"> </textarea> </form></div> </body> </html>
any help greatly appreciated

New Topic/Question
Reply




MultiQuote









|