Omega-Mark
04-05-2005, 02:21 PM
Hello, I am using one of my own pre-made forms for input into an sql db and i know I can use this same one for a gallery system im making for my own site.. basically i want this to happen upload the file to a directory already defined as $dir (chmod to 0777 obviously) and I want my query for inserting to the db to grab the filename and the dir (in the query to file input is $file) so i want it to insert $url into the db as $dir/$filename uploading the file in the process.
all help is appreciated thanks in advance
$url obviously isnt defined yet.
require('config.php');
$sql2 = "insert into images
(title, gallery, url, description) values
('$title','$gallery','$url','$description')"; #create query
$result = @mysql_query($sql2,$conn)
or die("Could not execute query - check code settings"); #execute query
if($result) { echo("<meta http-equiv='refresh' content=0;url=gallery.php'>"); } is the code which will need to be edited.
all help is appreciated thanks in advance
$url obviously isnt defined yet.
require('config.php');
$sql2 = "insert into images
(title, gallery, url, description) values
('$title','$gallery','$url','$description')"; #create query
$result = @mysql_query($sql2,$conn)
or die("Could not execute query - check code settings"); #execute query
if($result) { echo("<meta http-equiv='refresh' content=0;url=gallery.php'>"); } is the code which will need to be edited.
