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 insers "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 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']);
[B]$logo = (defaultimage.png); [/B]
$registerPassword = trim($_POST['password']);
$registerConfirmPassword = trim($_POST['confirmPassword']);
$logo = "defaultimage.png";
Strings in php must be placed in quotes. Without quotes you were actually concatenating two non-existent constants - non-existent constants are converted by php to strings while issuing an E_NOTICE error - don't do such things since this is unreliable and creates confusion - as you can see yourself!