Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Hello
I'm getting no results from the code below. It just refreshes the page but stores nothing to my database. Simply, I want it to store two images. Any help would be appreciated.
Thanks,
Peter
----Code: Select all
<?
if(isset($_POST['upload2']))
{
$icon_name = $_FILES['userfile']['iname'];
$tmpName = $_FILES['userfile']['tmpname'];
$icon_size = $_FILES['userfile']['isize'];
$icon_type = $_FILES['userfile']['itype'];
$ad_name = $_FILES['ad_userfile']['aname'];
$tmpName = $_FILES['ad_userfile']['tmpname'];
$ad_size = $_FILES['ad_userfile']['asize'];
$ad_type = $_FILES['ad_userfile']['atype'];
$icon = $_POST['icon'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$adtitle = $_POST['adtitle'];
$adurl = $_POST['adurl'];
$adcopy = $_POST['adcopy'];
$city = $_POST['city'];
$state = $_POST['state'];
$bname = $_POST['bname'];
$bweb = $_POST['bweb'];
if(!get_magic_quotes_gpc())
{
$fileName = addslashes($fileName);
}
include 'library/config.php';
include 'library/opendb.php';
$query = "INSERT INTO upload2 (iname, isize, itype, icon_content, aname, asize, atype, ad_content, icon, fname, lname, email, adtitle, adurl, adcopy, city, state, bname, bweb) VALUES ('$icon_Name', '$icon_size', '$icon_type', '$icon_content', '$ad_name', '$ad_size', '$ad_type', '$ad_content', '$icon', '$fname', '$lname', '$email', '$adtitle', '$adurl', '$adcopy', '$city', '$state', '$bname', '$bweb')";
mysql_query($query) or die('Error, query failed');
include 'library/closedb.php';
header('Location: step2_image.html');
}
?>feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]