Re: Re: FIle Uploading to database
| From: | Dan Brunner | Date: | Mon, 04 Feb 2002 15:45:46 +0000 |
| Subject: | Re: Re: FIle Uploading to database | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-16489@lists.php.net to get a copy of this message | ||
Make sure the path name is correct....
Let's say you compiled apache with this prefix /web....
you must have the full path name to work...like this
exec("cp '$ResumeUp' '/web/htdocs/resumes/$ResumeUp2'");
Also check permissions...
I think that was my problem at first too!!!
You can also do debug the script.....
Like this
echo $ResumeUp;
That should print the tmp file you form created.......
Let me know...
Once this pasts...It works really well...
Dan
On Monday, February 4, 2002, at 09:35 AM, todd@williamsen.net wrote:
The INSERT statement works fine now, but the file isn't being uploaded. I cannot figure out why -----Original Message----- From: Dan Brunner [mailto:daniel.brunner@desteracs.com] Sent: Monday, February 04, 2002 7:54 AM To: todd@williamsen.net Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Re: FIle Uploading to database Hey did you get it to work yet?!?! Dan On Sunday, February 3, 2002, at 09:08 PM, todd@williamsen.net wrote:Umm.. SET parameter is for the UPDATE query "Adam Royle" <adam@bigbridge.com.au> wrote in message news:NFBBLNHECLCHINBOIGAEMEGICAAA.adam@bigbridge.com.au...selectYou missed the SET parameter in your query... example is below... $query = "INSERT INTO Canidate SET (FirstName, LastName, Indus... Adam -----Original Message----- From: Todd Williamsen [mailto:todd@williamsen.net] Sent: Monday, February 04, 2002 11:06 AM To: php-db@lists.php.net Subject: Re: FIle Uploading to database Well... thanks to Dan Burner for the script... BUT I cannot get this friggin INSERT statement to execute.. which craps out.. I cannot figure it out. I have been staring at it for about an hour and I still cannot figure it out here it is: $db = @mysql_select_db($db_name, $connection) or die("Could notAddress1,database"); $query = "INSERT INTO Canidate(FirstName, LastName, Industry,'$ResumeUp2')";Address2, City, State, Zip, LocationPref, Phone, Email, ResumeUp) VALUES ('$FirstName', '$LastName', '$Industry' '$Address1', 'Address2', '$City', '$State', '$Zip', '$LocationPref', '$Phone', '$Email',$result = @mysql_query($query, $connection) or die("could not execute query"); $pat = array("#", "@", "*", "&", "%", "@","$","'","`"); $w= '_'; $ResumeUp2 = str_replace ($pat, $w, stripslashes($ResumeUp)); exec("cp '$ResumeUp' '/resumes/$ResumeUp2'"); ?> it errors out on the $result "could not execute query" Let me know if you need more info! Thank you!-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php