im very new to php and am having problems adding information into my database, here are the files i am trying to use which are based upon other files i found on here a week ago.
/constants.php/
<?php
$db_name = 'dhstshop';
$host = 'localhost';
$user = 'root';
$pass = 'password';
?>
/constants ends here/
/additem1.html/
<html>
<body>
<form method="post" action="additem2.php">
<p>NAME :
<input type="Text" name="name">
<br>
DESCRIPTION:
<input type="Text" name="description">
<br>
IMAGE :
<input type="file" name="image">
<br>
CATEGORY :
<input type="Text" name="catagory">
<br>
GUEST PRICE :
<input type="Text" name="guest_price">
<br>
MEMBER PRICE :
<input type="Text" name="member_price">
<br>
STOCK LEVEL :
<input type="Text" name="stock_level">
<br>
</p>
<input type="Submit" name="enter" value="Accept">
</p>
</form>
</body>
</html>
/additme1.html ends here /
/additem2.php/
<html>
<body>
<?php
include ("constants.php");
$name = $POST['name'];
$description = $POST['description'];
$image = $POST['image'];
$catagory = $POST['catagory'];
$guest_price = $POST['guest_price'];
$member_price = $POST['member_price'];
$stock_level = $_POST['stock_level'];
$connection = mysql_connect('$host','$user','$pass') or die ("couldn't connect to server");
$db = mysql_select_db ($db_name, $connection) or die ("Unable to select the database");
$query = "INSERT INTO stock (name, descripcion, image, catagory, guest_price, member_price, stock_level)
VALUES ('$name', '$description', '$image', '$catagory', '$guest_price', '$member_price', '$stock_level')";
$result = mysql_query($query) or die ("Unable to execute sql insert")
echo "Item has been inserted into the database";
mysql_close();
echo "<p><img src=images/$image width=150 height=150 border=1>";
?>
</body>
</html>
the data does not insert into the database and when i click the button on additem1.html, additem2.php appears but displays only a blank screen. If anyone can spot where i am going wrong with this code or has any surgestions i would be very greatful.
Dan