justlukeyou Posted December 14, 2012 Share Posted December 14, 2012 (edited) Hi, I have set up a image upload script for members. However I am now trying to insert a defaultimage (defaultimage.png) when people register. The problem is the code below inserts "defaultimagepng" and not "defaultimage.png". Can anyone advise how I can insert "defaultimage.png"? Do I need to set up a string for this or is there a completely different way to do this? $firstname = mysql_real_escape_string(trim($_POST['firstname'])); $surname = mysql_real_escape_string(trim($_POST['surname'])); $registerEmail = trim($_POST['email']); $logo = (defaultimage.png); $registerPassword = trim($_POST['password']); $registerConfirmPassword = trim($_POST['confirmPassword']); Edited December 14, 2012 by justlukeyou Quote Link to comment https://forums.phpfreaks.com/topic/271978-insert-defaultimagepng-upon-membership-registration/ Share on other sites More sharing options...
MDCode Posted December 14, 2012 Share Posted December 14, 2012 And you can't just type out defaultimage.png ...? Quote Link to comment https://forums.phpfreaks.com/topic/271978-insert-defaultimagepng-upon-membership-registration/#findComment-1399285 Share on other sites More sharing options...
PFMaBiSmAd Posted December 14, 2012 Share Posted December 14, 2012 You need to have php's error_reporting set to E_ALL and display_errors set to ON in your master php.ini on your development system so that php will help you by reporting and displaying all the errors it detects. You would be getting a php error message where the problem is at that would help you fix it yourself. Hint: look at the other literal strings in your code and compare them with the $logo assignment statement. Quote Link to comment https://forums.phpfreaks.com/topic/271978-insert-defaultimagepng-upon-membership-registration/#findComment-1399288 Share on other sites More sharing options...
justlukeyou Posted December 14, 2012 Author Share Posted December 14, 2012 (edited) Hi SocialCloud, Not sure what you mean? I have this but it inserts defaultimagepng (without the dot) $logo = (defaultimage.png); Is there anyway I can get it to insert defaultimage.png with the dot? Edited December 14, 2012 by justlukeyou Quote Link to comment https://forums.phpfreaks.com/topic/271978-insert-defaultimagepng-upon-membership-registration/#findComment-1399290 Share on other sites More sharing options...
justlukeyou Posted December 14, 2012 Author Share Posted December 14, 2012 Oh right, I just needed to change it to this: $logo = ('defaultimage.png'); Its 1 AM here. Time for bed. Quote Link to comment https://forums.phpfreaks.com/topic/271978-insert-defaultimagepng-upon-membership-registration/#findComment-1399291 Share on other sites More sharing options...
MDCode Posted December 14, 2012 Share Posted December 14, 2012 Hi SocialCloud, Not sure what you mean? There is no reason to store it as a variable. Just typing out defaultimage.png in your query would've saved you all the time figuring it out. Quote Link to comment https://forums.phpfreaks.com/topic/271978-insert-defaultimagepng-upon-membership-registration/#findComment-1399297 Share on other sites More sharing options...
Pikachu2000 Posted December 14, 2012 Share Posted December 14, 2012 You need to have php's error_reporting set to E_ALL and display_errors set to ON in your master php.ini on your development system so that php will help you by reporting and displaying all the errors it detects. You would be getting a php error message where the problem is at that would help you fix it yourself. Hint: look at the other literal strings in your code and compare them with the $logo assignment statement. He's been told that repeatedly and refuses to do it. Quote Link to comment https://forums.phpfreaks.com/topic/271978-insert-defaultimagepng-upon-membership-registration/#findComment-1399300 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.