Uploading images to a database - help needed

  • Rabid Dog
  • Cheese Monkey
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3188
  • Loc: South Africa
  • Status: Offline

Post July 6th, 2009, 6:24 am

Code: [ Download ] [ Select ]
 
$visitor = $visitor['visitor'];
$lovedone = $lovedone['lovedone'];
$comment = $comment['comment'];
 
  1.  
  2. $visitor = $visitor['visitor'];
  3. $lovedone = $lovedone['lovedone'];
  4. $comment = $comment['comment'];
  5.  


Should be
Code: [ Download ] [ Select ]
 
$visitor = $_POST['visitor'];
$lovedone = $_POST['lovedone'];
$comment = $_POST['comment'];
//Thanks for point it out George
 
  1.  
  2. $visitor = $_POST['visitor'];
  3. $lovedone = $_POST['lovedone'];
  4. $comment = $_POST['comment'];
  5. //Thanks for point it out George
  6.  
My Software Development Company
Music I have recorded (fixed now :))
Image
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 6th, 2009, 6:24 am

  • George L.
  • Bronze Member
  • Bronze Member
  • User avatar
  • Joined: Nov 05, 2007
  • Posts: 1840
  • Loc: sinister passage
  • Status: Offline

Post July 6th, 2009, 6:34 am

$visitor = $POST['visitor'];

$visitor = $_POST['visitor'];

I just thought that if the latter is the one we normally use?

Not to make what I have said sound mysery or anything. Well, the 'lazy' work I talked about is anything is stored in the server instead but renders through the database. I know that is not what you are looking for. /* if want to hear about it, still I am not embarrassed to share */

Thanks Rabid Dog.
I do have a drug but it's not like pot or ecstasy it's love that's my drug and it will always be that way
(Thanks to boogs2007 & evenstar), this heart?
  • gromituk2k
  • Newbie
  • Newbie
  • User avatar
  • Joined: Jun 29, 2009
  • Posts: 13
  • Loc: West Yorkshire, England
  • Status: Offline

Post July 6th, 2009, 7:29 am

Any ideas why it is only adding the 1st character?

EDIT:
Sorry, just noticed the replys.

Thats all working now, thanks alot guys :D
  • Rabid Dog
  • Cheese Monkey
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3188
  • Loc: South Africa
  • Status: Offline

Post July 6th, 2009, 7:50 am

Pleasure :) Enjoy
My Software Development Company
Music I have recorded (fixed now :))
Image
  • gromituk2k
  • Newbie
  • Newbie
  • User avatar
  • Joined: Jun 29, 2009
  • Posts: 13
  • Loc: West Yorkshire, England
  • Status: Offline

Post July 6th, 2009, 8:11 am

I do not belive this, it has now stopped working.

The text data is being uploaded fine, and even the echos that I am running are fine, saying the correct image size, but the image is failing to upload, with only adding "[BLOB - 10 Bytes]" in the PHP MyAdmin view and when using the code (http://www.rabiddog.co.za/tutorial.php? ... usingMySQL) to view the images, there not viewing the latest images that I have uploaded.

Any ideas what could be coursing this?
  • Rabid Dog
  • Cheese Monkey
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3188
  • Loc: South Africa
  • Status: Offline

Post July 6th, 2009, 8:23 am

What is not working? The uploading or the viewing?

I noticed that you removed
Code: [ Download ] [ Select ]
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">


From your form. Put it back in and try again. I think you might be restricted as to the file size you can upload.
My Software Development Company
Music I have recorded (fixed now :))
Image
  • gromituk2k
  • Newbie
  • Newbie
  • User avatar
  • Joined: Jun 29, 2009
  • Posts: 13
  • Loc: West Yorkshire, England
  • Status: Offline

Post July 6th, 2009, 8:30 am

Its a problem with the uploading. Dosent seem to be adding the image to the database.

have added that back in, but still no luck.
  • Rabid Dog
  • Cheese Monkey
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3188
  • Loc: South Africa
  • Status: Offline

Post July 6th, 2009, 8:35 am

Can you access the log files?
My Software Development Company
Music I have recorded (fixed now :))
Image
  • gromituk2k
  • Newbie
  • Newbie
  • User avatar
  • Joined: Jun 29, 2009
  • Posts: 13
  • Loc: West Yorkshire, England
  • Status: Offline

Post July 6th, 2009, 8:50 am

I cant seem to find the log files. My server seeps to keep other logs, like ftp access, but cant find anything for mysql.
  • Rabid Dog
  • Cheese Monkey
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3188
  • Loc: South Africa
  • Status: Offline

Post July 6th, 2009, 9:06 am

You are looking for the http log files
My Software Development Company
Music I have recorded (fixed now :))
Image
  • gromituk2k
  • Newbie
  • Newbie
  • User avatar
  • Joined: Jun 29, 2009
  • Posts: 13
  • Loc: West Yorkshire, England
  • Status: Offline

Post July 8th, 2009, 1:34 am

I cant seem to find the log files :s
  • George L.
  • Bronze Member
  • Bronze Member
  • User avatar
  • Joined: Nov 05, 2007
  • Posts: 1840
  • Loc: sinister passage
  • Status: Offline

Post July 10th, 2009, 7:07 am

gromituk2k wrote:
I do not belive this, it has now stopped working.

The text data is being uploaded fine, and even the echos that I am running are fine, saying the correct image size, but the image is failing to upload, with only adding "[BLOB - 10 Bytes]" in the PHP MyAdmin view and when using the code (http://www.rabiddog.co.za/tutorial.php? ... usingMySQL) to view the images, there not viewing the latest images that I have uploaded.

Any ideas what could be coursing this?

Do you want to be able to upload images and view it on webpage. When necessary, you can also edit or delete the image? if this is what you want, I may be able to help.
I do have a drug but it's not like pot or ecstasy it's love that's my drug and it will always be that way
(Thanks to boogs2007 & evenstar), this heart?
  • Rabid Dog
  • Cheese Monkey
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3188
  • Loc: South Africa
  • Status: Offline

Post July 10th, 2009, 7:22 am

George, post your solution.

Gromit please post your code so i can run through it
My Software Development Company
Music I have recorded (fixed now :))
Image
  • George L.
  • Bronze Member
  • Bronze Member
  • User avatar
  • Joined: Nov 05, 2007
  • Posts: 1840
  • Loc: sinister passage
  • Status: Offline

Post July 10th, 2009, 8:02 am

/*wrong solution*/

Message deleted.

Sorry.
I do have a drug but it's not like pot or ecstasy it's love that's my drug and it will always be that way
(Thanks to boogs2007 & evenstar), this heart?
  • Rabid Dog
  • Cheese Monkey
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3188
  • Loc: South Africa
  • Status: Offline

Post July 10th, 2009, 8:21 am

George I ain't looking for the solution ;) I have done this 100 times. I thought your solution might be easier for gromit to understand
My Software Development Company
Music I have recorded (fixed now :))
Image
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 10th, 2009, 8:21 am

Post Information

  • Total Posts in this topic: 33 posts
  • Users browsing this forum: No registered users and 140 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.