www.webdeveloper.com
Results 1 to 2 of 2

Thread: T_encapsed_and_whitespace?

  1. #1
    Join Date
    Aug 2012
    Posts
    1

    T_encapsed_and_whitespace?

    I've been creating a gallery for a webpage and during testing of the script I came across this error.

    Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hermes/waloraweb064/b635/pow.whitephoenix/ghpf/htdocs/upload_file.php on line 94

    I've looked at other threads and none seemed to give a working anser to my problem.

    The code in question is,

    PHP Code:
    mysql_query("INSERT INTO $username VALUES $_FILES['file']['name']"); 
    Any Ideas why that line might be calling the error?

  2. #2
    Join Date
    Dec 2011
    Location
    Centurion, South Africa
    Posts
    779
    Try this:

    PHP Code:
    mysql_query("INSERT INTO $username VALUES {$_FILES['file']['name']}"); 
    JavaScript: Learn | Validate | Compact

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles