Jump to content

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


wawenka

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>

Archived

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

×
×
  • Create New...

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.