this is php code for inventory management system
which is done using SQLite.....this is an user
interface where an user wil giv values to the text
boxes and it should be saved in the backend database
which is sqlite..
but when i run this code on browser it is giving an
error ... Parse error: parse error in
/home/saravall/.HTML/inv.php on line 81


$db ="/home/saravall/office.db";
$handle = sqlite_open($db) or die("could not open

if(isset($_POST['submit'])) {

    if (!empty($_post['tagno']) && !empty
($_post['desc']) &&
!empty ($_post['acqdt']) && !empty
($_post['manufacturer']) && !empty
 ($_post['model']) &&    !empty($_post['serialid']) &&
!empty( $_post
['custloc']) && !empty($_post['totcost']))
$insquery = "insert into inventory
(tagno,desc,acqdt,manufacturer,model, serial
id,custloc,totcost) values (\"".sqlite_escape_string(
$insresult = sqlite_query($handle,$insquery) or
echo "<i>successfully inserted!</i><p />";
else {
echo "<i>incomplete from input!</i><p />";
  $query = "SELECT * FROM inventory ";
$result = sqlite_query($handle,$query) or

if (sqlite_num_rows($result) > 0)
echo "<table cellpadding=20 border=1>";
while ($row = sqlite_fetch_array($result))
echo "<tr>";
echo "<td>".$row[0]."</td>";
echo "<td>".$row[1]."</td>";
echo "<td>".$row[2]."</td>";
echo "<td>".$row[3]."</td>";
echo "<td>".$row[4]."</td>";
echo "<td>".$row[5]."</td>";
echo "<td>".$row[6]."</td>";
echo "<td>".$row[7]."</td>";
echo "<td>".$row[8]."</td>";
echo "<td>".$row[9]."</td>";
echo "</tr>";
echo "</table>";

enter  new record:</h2>
<form method="post" action="<?php  echo
Tag number:<input type="text" name="number">  
desc:<input type="text" name="desc">
acq date:<input type="text" name="date">
manufacturer:<input type="text" name="manufacturer">
model:<input type="text" name="model">
serial id:<input type="text" name="serial id">
custodian location:<input type="text"
sum cost:<input type="text" name="cost">
<input type="submit" name="submit" value ="save">

i would appreciate if you can help me in correcting
this error..
thanks in advance..

Do you Yahoo!?
Declare Yourself - Register online to vote today!

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to