i can upload to MYSQL, with user generated content, picture included...
when i access the information, everything appears but the picture, just the pictures file name is listed (no pic)
is my code wrong?... am i missing something?
would appreciate any help
define(`uploadpath`, `htdocs/phpsessions/images`);
{
$pix=$_FILES['pix']['name'];
$target=uploadpath . $pix;
echo"$target";
if(move_uploaded_file($pix, $target)){
// do your coding here to give a thanks message or any other thing.
}else{echo "Failed to upload file Contact Site admin to fix the problem";}
$user="user";
$host="website";
$passwd="password";
$dbname="alpha";
$cxn = mysql_connect('website', 'user', 'passord'); if (!$cxn) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_select_db(alpha);
$sql = "INSERT INTO details (`classificationss`,`condition`,`type`,`price`,`region`,`size`,`comment`,`pix`) VALUES ('$classificationss', '$condition','$type','$price','$region','$size','$comment','$pix')";
$result = mysql_query($sql,$cxn)
or die("Couldn't execute ? query: " . mysql_error());
$_SESSION['auth']="yes";
$_SESSION['logname'] = $loginName;
header("Location: New_member.php");
}
break;
default:
include("login_form2.inc");
/*end of thing3*/
}
?>
<? ob_flush(); ?>