Through two pages on a website that I don't plan to ever leave my home computer, I want to use a form to input items into a MySQL database also hosted on my computer. I've done this before with something nearly identical, but for some reason this one isn't working. I'm not worried about the security of this or anything like that as it won't be leaving my own computer, I just want it to actually work.
Form:
<form action='addclothes.php' method='post'><table style="font-family:verdana;font-size:14px;color:#004766;"><tr><td>
Type of clothing:</td><td><select name="type">
<option value="0">---</option>
<option value="dresses">Dress</option>
<option value="tops">Top</option>
<option value="bottoms">Bottom</option>
<option value="shoes">Shoes</option>
<option value="accessories">Accessory</option></select></td></tr>
<tr><td>Name:</td><td><input type="text" name="name"></td></tr>
<tr><td>Path to full image:</td><td><input type="text" name="largeimagepath"></td></tr>
<tr><td>Path to thumbnail:</td><td><input type="text" name="smallimagepath"></td></tr>
<tr><td colspan="2"><center><input type="submit" value="Submit" name="submit"></center></td></tr>
</table></form>
That sends over to addclothes.php, which looks like this, encased in html to keep the same layout:
<?php
$name = $_POST['name'];
$table = $_POST['type'];
$largepath = $_POST['largeimagepath'];
$thumbpath = $_POST['smallimagepath'];
$db = mysql_connect("localhost", "root", "******") or die(mysql_error());
mysql_select_db("Default") or die(mysql_error());
$query = "INSERT INTO clothes."{$table}" (name, imagepath, thumbimagepath)
VALUES("{$name}", "{$largepath}", "{$thumbpath}")";
mysql_query($query) or die(mysql_error()); ?>
<p>Item Added!</p>
It comes to the next page and just says "Item added" no matter what. If I try to echo the query just after I create the variable that doesn't show up either.