SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Feb 2007
    Posts
    731
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Insert defaultimage.png Upon Membership Registration?

    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 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.


    Code:
       $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']);

  2. #2
    SitePoint Guru bronze trophy
    Join Date
    Dec 2003
    Location
    Poland
    Posts
    930
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $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!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •