astralaaron Posted December 6, 2007 Report 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 Report Share Posted December 6, 2007 sorry i got it working Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now