Hi guys,
I've been looking on the net for a few hours now, but all the results that I find are ways of inserting records into tables, not creating a new field inside a table.
I want to create a new Field, which would be named what ever was filled out in the form below: [code]New Catagory: <input type="text" name="newcatagory" /><br />[/code]
[code]
<form action="uploadimage.php" method="post" name="upload" enctype="multipart/form-data">
<input type="hidden" name="max_file_size" value="1500000" />
Choose File (Max 1.5mb): <input type="file" name="userfile" /><br />
Description / Keywords: <input type="text" name="description" /><br />
New Catagory: <input type="text" name="newcatagory" /><br />
Pre-Defined Catagory: <select name="imagegallery"><br />
<input type="submit" name="submit" value="Upload" />
</form>
[/code]
I thought that the page 'uploadimage.php' would need this;
[code]mysql_select_db ('imagegallery');
mysql_query ("insert into imagegallery (newcatagory) values ($newcatagory)");
header ("Location:members.php");[/code]
but it doesn't add the new Field :( My Database is 'assessment', and the table is 'imagegallery'
inside the 'imagegallery' i have some fields (sports, arts, holiday), but I want the above form to add another one.
Any ideas?