Uploading images to a database - help needed

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

Post July 6th, 2009, 6:24 am

Code: [ 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: [ 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.  
Watch me grow
  • 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
  • No Avatar
  • Joined: Nov 05, 2007
  • Posts: 2206
  • Loc: Malaysia
  • 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.
  • gromituk2k
  • Newbie
  • Newbie
  • User avatar
  • Joined: Jun 29, 2009
  • Posts: 14
  • 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
  • Web Master
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3229
  • Loc: South Africa
  • Status: Offline

Post July 6th, 2009, 7:50 am

Pleasure :) Enjoy
Watch me grow
  • gromituk2k
  • Newbie
  • Newbie
  • User avatar
  • Joined: Jun 29, 2009
  • Posts: 14
  • 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
  • Web Master
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3229
  • 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: [ 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.
Watch me grow
  • gromituk2k
  • Newbie
  • Newbie
  • User avatar
  • Joined: Jun 29, 2009
  • Posts: 14
  • 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
  • Web Master
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3229
  • Loc: South Africa
  • Status: Offline

Post July 6th, 2009, 8:35 am

Can you access the log files?
Watch me grow
  • gromituk2k
  • Newbie
  • Newbie
  • User avatar
  • Joined: Jun 29, 2009
  • Posts: 14
  • 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
  • Web Master
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3229
  • Loc: South Africa
  • Status: Offline

Post July 6th, 2009, 9:06 am

You are looking for the http log files
Watch me grow
  • gromituk2k
  • Newbie
  • Newbie
  • User avatar
  • Joined: Jun 29, 2009
  • Posts: 14
  • 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
  • No Avatar
  • Joined: Nov 05, 2007
  • Posts: 2206
  • Loc: Malaysia
  • 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.
  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3229
  • 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
Watch me grow
  • George L.
  • Bronze Member
  • Bronze Member
  • No Avatar
  • Joined: Nov 05, 2007
  • Posts: 2206
  • Loc: Malaysia
  • Status: Offline

Post July 10th, 2009, 8:02 am

/*wrong solution*/

Message deleted.

Sorry.
  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3229
  • 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
Watch me grow
  • 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 106 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.