0

Hi!
Can somwhone make, or copy here php image upload code, I was searching on internet but found nothing...

What I need is that, to upload picture to database, but not blob, and show it in actual link like
www.website.com/pictures.php?id= <--and there a number, that shows a picture. And switching from newest pictures to oldest, like

echo '<a href="thisPage.php?id=' + ($id + 1) + '">Next</a>';

Yeah and if that id is deleted, than switch to next.. Pls somwhone help )

2
Contributors
1
Reply
2
Views
4 Years
Discussion Span
Last Post by diafol
2

This has been covered to death on this forum. Have a search here first. Also, there is a decent tutorial on Tizag's site: http://www.tizag.com/phpT/fileupload.php

The php manual: http://php.net/manual/en/function.move-uploaded-file.php

I've just constributed to a couple of threads yesterday with regard to storing fielnames in a DB, here's one: http://www.daniweb.com/web-development/php/threads/440315/gallery-image-delete-or-hide

Seriously, there's hell of a lot of info out there.

echo '<a href="thisPage.php?id=' + ($id + 1) + '">Next</a>';

That's a little bit dicey as you may delete an image from the DB, so the ids may not be sequential. Alternatively you could still use it like this:

Edited by diafol

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.