


<p>
ItemDescriptionInsert Table:<br />
<form action="ItemDescriptionInsert.php" method="post">

	ItemID:<br />
	<input type="text" name="ItemID" size="6" maxlength="6" value=""/>
	</p>
	<p>

	Brand:<br />
	<input type="text" name="Brand" size="30" maxlength="30" value="" />
	</p>
	<p>

	Model:<br />
	<input type="text" name="Model" size="30" maxlength="30" value="" />
	</p>
	<p>

	Gender:<br />
	<input type="text" name="Gender" size="1" maxlength="1" value="" />
	</p>
	<p>

	WholeSale:<br />
	<input type="text" name="WholeSale" size="6" maxlength="6" value="" />
	</p>
	<p>

<input type="submit" name="submit" value="Submit!" />
</p>
</form>

<?php

if (isset($_POST['ItemID']) && isset($_POST['Brand']) && isset($_POST['Model'])
&& isset($_POST['Gender']) && isset($_POST['WholeSale']))
{

	$linkID = mysql_connect("localhost","root","ktm250") or die("No connection");
	mysql_select_db("newstore") or die("No connection");

	$ItemID = mysql_real_escape_string($_POST['ItemID']);
	$Brand = mysql_real_escape_string($_POST['Brand']);
	$Model = mysql_real_escape_string($_POST['Model']);
	$Gender = mysql_real_escape_string($_POST['Gender']);
	$WholeSale = mysql_real_escape_string($_POST['WholeSale']);

	$query = "INSERT INTO ItemDescription VALUES('$ItemID', '$Brand', '$Model', '$Gender',
	'$WholeSale')";

	$result = mysql_query($query);

	echo "ItemID: $ItemID <br>";
	echo "Brand: $Brand <br>";
	echo "Model: $Model <br>";
	echo "Gender: $Gender <br>";
	echo "WholeSale: $WholeSale <br>";
	echo "<br>";

	mysql_close();
}

?>

<a href="index.html">Return to main...</a>
