![]() |
Error with image file upload
I have added the file image upload code while I wait on a response regarding file image upload to database.
Anyway, here is the code I'm using thus far: PHP Code:
When I click submit, I get the following error: Code:
Database error in vBulletin 3.6.8: Steve :) |
Missing quote, see below:
Code:
INSERT INTO `sponsors` |
I don't see how I'm missing a quote. Very stange.
--------------- Added [DATE]1201192811[/DATE] at [TIME]1201192811[/TIME] --------------- Found the problem, had to switch this line: PHP Code:
PHP Code:
Still there is a problem, when it goes to upload, seems it doesn't even try to upload or anything. |
You may want to double-check your code for the upload path. I don't think you want to say:
$upload->path = './'.$options['sponsor_imgpath']; I think you need to add something in there: $upload->path = './'.$vbulletin->options['sponsor_imgpath']; ?? Maybe? I had to play with upload code for the torrents on my site. I found it very frustrating because the way I did it, it would not spit out errors to me on the screen. I keep thinking I should rewrite it, but I haven't gotten around to it. |
Lynne, that is incorrect, I have my own settings, I am not using vBulletin's built in settings stuff. I did my own settings table, settings page, etc so its easier for upgrading and uninstalling.
Thats not the problem, not sure what is but I'm gonna have to do the file upload stand alone and go from there. |
Almost 5 days have passed and not another response. Can anyone help me get this upload stuff to work?
|
PHP Code:
|
LOL, I should have thought to do that, thats what happens when you have alot on your mind and too tired to think.
--------------- Added [DATE]1201592290[/DATE] at [TIME]1201592290[/TIME] --------------- Dismounted: This is what print_r outputs: Code:
Array ( ) BTW, here is the code for my admin page that has the browse file field. PHP Code:
|
If it's empty, it means that there's (obviously) no data to insert in the first place. Have you actually cleaned it with the cleaner? Because if you haven't, there's no way it'll magically appear in the GPC array.
|
Dismounted: Here is my GPC array.
PHP Code:
|
All times are GMT. The time now is 10:38 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|