Re: Stuck trying to upload and grab file name
| From: | Jim Giner | Date: | Tue, 24 Jul 2012 16:43:16 +0000 |
| Subject: | Re: Stuck trying to upload and grab file name | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-48346@lists.php.net to get a copy of this message | ||
On 7/24/2012 4:16 AM, Brad wrote:
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.$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 = <<<EOFLOAD DATA LOCAL INFILE '{$_FILES['file']['name']}'Brad,