Code: Select all
<HTML>
<BODY>
<form action="datain.php" method="post">
Enter your name: <input type="text" name="manufacturer">
h: <input type="text" name="model">
<input type="submit" name="SUBMIT" value="Submit">
</form>
</HTML>Code: Select all
<HTML>
<?php
$db = mysql_connect("localhost", "dmce", "mac128");
mysql_select_db("robertsons",$db);
$sql = "INSERT INTO products (manufacturer, model) VALUES ('$_POSTїmanufacturer]','$_POSTїmodel]')";
$result = mysql_query($sql);
echo $_POSTї'manufacturer'];
echo $_POSTї'model'];
?>
</HTML>looks like this in database:
1 tos 21s23
2 tos 21n21
3 tos 21v33
33 tos 32z33
32 tos 28z33
31 tos 24z33
any ideas as to why its appearing in the wrong order