Jump to content

Archived

This topic is now archived and is closed to further replies.

wawenka

i don know what is wrong with this code pliz some1 help

Recommended Posts

<html>
<body>
// Set Mysql Variables
<?php
$host = 'localhost';
$user = 'root';
$pass = '';
$db = 'KenetInventory';
$table = 'Equipment';

// Set global variables to easier names
$ItemNo = $_POST['ItemNo'];
$Manufacturer = $_POST['Manufacturer'];
$Model = $_POST['Model'];
$SerialNO = $_POST['SerialNo'];
$Description = $_POST['Description'];
mysql_connect($host,$user,$pass) or die(mysql_error());
mysql_select_db(KenetInventory) or die(mysql_error());
$add_all = 'INSERT INTO Equipment values('$ItemNo','$Manufacturer','$Model','$SerialNo','$Description',''');
mysql_query($add_all) or die(mysql_error());
}
?>
</body>
</html>

Share this post


Link to post
Share on other sites
[code=php:0]
$add_all = 'INSERT INTO Equipment values('$ItemNo','$Manufacturer','$Model','$SerialNo','$Description','')';
[/code]

Share this post


Link to post
Share on other sites
[code=php:0]
'$Description','')';
[/code]

look at your structure at the end of the line

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.