voloproductions Posted September 22, 2009 Author Share Posted September 22, 2009 look under here: the variable $uploadEND is created there. //chcek file & size $filename = basename($_FILES['uploaded_file']['name']); $ext = substr($filename, strrpos($filename, '.') + 1); if (($ext = "jpg,gif,xls,doc,png") && ($_FILES["uploaded_file"]["type"] = "jpg,gif,xls,doc,png") && ($_FILES["uploaded_file"]["size"] < 350000000)) { //Determine the path to which we want to save this file $newname = dirname(__FILE__).'/files/'.$filename; //Check if the file with the same name is already exists on the server if (!file_exists($newname)) { //Attempt to move the uploaded file to it's new place if ((move_uploaded_file($_FILES['uploaded_file']['tmp_name'],$newname))) { $uploadEND = '<a href=\"downloadfilelink\">' . $newname . "</a>"; // AND LETS RUN OUR UPLOAD CHECKS!! } else { echo "Error: A problem occurred during file upload!"; } } else { echo "Error: File ".$_FILES["uploaded_file"]["name"]." already exists"; } } else { echo "Upload Error, Only JPG,GIF,XLS,DOC Allowed."; } //} else { //echo "Error: No file uploaded"; } Quote Link to comment https://forums.phpfreaks.com/topic/175122-php-help-needed/page/2/#findComment-923164 Share on other sites More sharing options...
mikesta707 Posted September 22, 2009 Share Posted September 22, 2009 ahh ok, sorry missed that. before the query, do a var_dump on $uploadEND then and make sure it has the data its supposed to have. are you getting any error messages from your upload checks? Quote Link to comment https://forums.phpfreaks.com/topic/175122-php-help-needed/page/2/#findComment-923167 Share on other sites More sharing options...
voloproductions Posted September 22, 2009 Author Share Posted September 22, 2009 how do I write this code to do this dump on the variable. No errors on upload checks.... I can echo out the uploadEND variable fine and it works great, just cannot get it saved into the database. Quote Link to comment https://forums.phpfreaks.com/topic/175122-php-help-needed/page/2/#findComment-923169 Share on other sites More sharing options...
mikesta707 Posted September 22, 2009 Share Posted September 22, 2009 just write var_dump($uploadEND); echo "<br />".$uploadEND; i threw an extra echo in there just because. where do you echo it? Quote Link to comment https://forums.phpfreaks.com/topic/175122-php-help-needed/page/2/#findComment-923170 Share on other sites More sharing options...
voloproductions Posted September 22, 2009 Author Share Posted September 22, 2009 uggh I gotta get going out of the office think you can email me? drumallday@gmail.com I would greatly appreciate more help! Thanks mike. Quote Link to comment https://forums.phpfreaks.com/topic/175122-php-help-needed/page/2/#findComment-923172 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.