astralaaron Posted December 6, 2007 Share Posted December 6, 2007 <?php $filename = $HTTP_POST_FILES['image']['name'];$filesize = $HTTP_POST_FILES['image']['size'];$filetype = $HTTP_POST_FILES['image']['type'];$gallery = $_POST['galv'];mysql_connect("localhost","root","***********")or die("connection error");mysql_select_db("galleries")or die("database error");if (!isset($gallery)) { die("no gallery selected");} else { $sql = "INSERT INTO" . $gallery . "(name)VALUES(' " . $filename . " ')"; $result1 = mysql_query($sql); if (!$result1){ die("error adding files".$gallery.$filename); }?> i want that to read something like"INSERT INTO g1(name)VALUES('p10234.jpg')"; Link to comment Share on other sites More sharing options...
astralaaron Posted December 6, 2007 Author Share Posted December 6, 2007 sorry i got it working Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.