Re: Stuck trying to upload and grab file name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/24/2012 4:16 AM, Brad wrote:
                         $file = $_FILES['file']['name'];

                         //$presql = "CREATE TABLE IF NOT EXISTS
(`$_SESSION[SESS_MEMBER_ID]_$file`)";

                         $presql = "CREATE TABLE IF NOT EXISTS
`$_SESSION[SESS_MEMBER_ID]_$file`";

                         $sql = <<<EOF

                         LOAD DATA LOCAL INFILE '{$_FILES['file']['name']}'


Brad,
Since you have defined a var $file containing what you need, why don't you use that var in your LOAD DATA line, instead of the convoluted $_FILES reference?

If I may ask, what does the reference to $_SESSION[SESS_MEMBER_ID] accomplish? Haven' had an occasion to do this.

I'm also wondering if the error you are receiving has anything to do with the name. It may be the syntax using those slashes as delimiter chars.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux