hi
can anyone help point me in the direction of a
members php upload profile script please.
hi
can anyone help point me in the direction of a
members php upload profile script please.
There are thousands, maybe millions of tutorials online on this subject. Each have their own way to handle the
user profile systems and each have their own ways to implement security. You should study various ones and
take the best parts of each that fits your uses. Here are a couple links for you to start with…
http://www.infismash.com/creating-a-user-profile-using-php-and-mysqli/
http://www.sourcecodester.com/tutorials/php/4343/how-create-profile-information-page-phpmysql.html
http://www.webestools.com/scripts_tutorials-code-source-14-members-area-system-in-php-mysql-members-users-system-area-log-sign.html
me and you worked on a messaging script earniealex do you still have it.
I might… I keep a lot of code as I help, but, after awhile I dump them if not needed again…
If it is on this site, you can search for it thru your posts. Just click on your name and scroll down thru the links.
My main machine died and I am waiting for a replacement hard disk, so I will not have access to saved files until
I can rebuild it and replace it with my backup. Most likely another week for that to be done…
no problem
i got this working http://www.w3schools.com/php/php_file_upload.asp
but now the file uploads to images folder how can i get it to display the image
Well, DJ, you just need to use a standard HTML image tag. Basically, just like this:
You need to alter the source to point at the file you uploaded and set the text if needed and sizing…
If you want to display the image in it’s full size just remove the sizing options. If you do not need alternative
text to be displayed when the user hovers over the picture, remove that. The source point needs to point at
the file and folder as needed. Let’s say that your “images” folder is in the root of your site. And that is where
your program is. (Website PHP page!) And, lets say you stored the name of the image in a variable named
$image_name… You would display it using PHP to insert the image name loosely like this:
As you see, you insert the name of the picture into the HTML tag along with the folder name. If the program
website page is in a sub folder, you may have to change how it points to the images folder. If the webpage is
in a sub-folder named “profiles”, you might have to back up a line using “…/images/” or if in the root “/images/”…
Hope this helps…
i wanted users to upload there pics to a folder called images then display them images on there profile page.
Well, I have done this in the past. When you upload the user’s picture, you just rename it to something that is
linked to them. You really do not want to use the name of their version of the picture because then you have to
save it in the database and make sure nobody else uses that name. A ton of extra work for nothing. So, when
your code uploads the picture, you save it using their user ID which is already in your system. So, let’s say they
upload a picture named “me on vacation in Jamica.jpg” You would just rename it to their ID. If you have them
logged in as userid #123, then rename the picture to “123.jpg” and save it in the images folder. Then, in the
profile picture display code, just use there userid to display it. src=‘images/<?PHP echo $userid . “.jpg”’ …
Then, use that same code anytime you need to display the picture. You might do that in a blog post or in their
profile page. Normally, when you display a post from a user, you already know the ID of the poster and can just
use that to display the image.