parse error in php backend sqlite

From: Date: Wed, 20 Oct 2004 23:12:38 +0000
Subject: parse error in php backend sqlite
Groups: php.db 
Request: Send a blank email to php-db+get-36945@lists.php.net to get a copy of this message
hi 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 63 <HTML> <HEAD> </HEAD> <body> <?php $db ="/home/saravall/office.db"; $handle = sqlite_open($db) or die("could not open database"); 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( $_post['tagno'])."\",\"".sqlite_escape_string($_post['desc'])."\",\"" .sqlite_escape_string($_post['serialid'])."\",\"".sqlite_escape_string($_post ['custloc'])."\",\"".sqlite_escape_string($_post['totcost'])."\")"; $insresult = sqlite_query($handle,$insquery) or die("error:".sqlite_error_string(sqlite_last_error($handle))); echo "<i>successfully inserted!</i><p />"; } else { echo "<i>incomplete from input!</i><p />"; $query = "SELECT * FROM inventory "; $result = sqlite_query($handle,$query) or die("err:".sqlite_error_string(sqlite_last_error($handle))); 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>"; } sqlite_close($handle); ?> </body> </html> i would appreciate if you can help me in correcting this error.. thanks in advance.. sai _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com

« previous php.db (#36945) next »