PHP Tutorials: Register & Login (Part 23): Profile Image Upload (Part 1)

preview_player
Показать описание

Official site

Twitter
Рекомендации по теме
Комментарии
Автор

Great tutorial as always - however just noticed..when doing this for the register & login site you need to also edit the profile.php page...otherwise when you visit someone elses profile youre going to see your profile image and name. On the profile.php page make sure you add the mysql field holding your image.. 'profile'
in the profile_data variable.

Make sure the if statement that echoes the profile image says profile_data not user_data, both in the parameters and in the echo statement.

aqcheryl
Автор

in your users.php under what you put for the register_user to post did you only do up to email code or did I miss something? since the other stuff below the email_code isnt allowed to be null how do you get the query from the register_user to complete without errors?

Geostalker
Автор

How can i link a profile image to a user when having two tables first is users table and the other is for example images table?

El_ii
Автор

the link you gave for the source code is broken. its saying the page is not found

JacobSmith-rqgn
Автор

Turning enabling error_reporting(0) won't actually make that actually go away ... The end() function is the one that returns this for some reason. You can use and intermediary variable so you don't put explode() inside the end() function and the error will go away. Something like this:
$file_name_exploded = explode('.', $file_name);
$file_extn =

Pitpalacu
Автор

thx alex...I've been waiting for this...

MrMatni
Автор

I like the tutorial and the way you explain is superb!!

winnerincrease
Автор

try to give it a value="your text". . Submit Query is its default value if im not mistaken. .

imbaTHISguy
Автор

Hi, guys. I get incorrect file error when I upload a correct file. Help please

juniorjay
Автор

This destroyed my whole webiste. I've removed the file but I can still not reach any of my pages eccept the index page. My site was working fine befor this. I have not changed any of my php files. what happened?

amandahernow
Автор

i get this error:
Strict Standards: Only variables should be passed by reference in on line 13..
my line 13 code is : $file_extn = strtolower(end(explode('.', $file_name)));
help

MrMatni
Автор

it is better if empty you display an image with some kind of icon you already design for no picture..

BaliLandandVilla
Автор

hi, I badly need your help.

this code is working in localhost but when I launch it using godaddy(host) the image is not appearing on the page and not saving to the path indicated but it is saved in my data base. please help Ive been doing this for 2 days with no sleep. thanks in advance

martindmartian
Автор

add or uncomment >> error_reporting(0); it goes inside init.php which fixed same problem for me.

ahayner
Автор

can simply be hacked by uploading a file such as hack.php..jpg, you need to check the extension and rename the file then upload

StormRocko
Автор

In users.php how to convert mysql to mysqli

vrkarthik
Автор

Did anybody else have a submit button that turned to Submit Query even though the type="submit" lol

SteveB
join shbcf.ru