Closed micmac473 closed 7 years ago
Instead of using a function to set the default profile picture if a user doesn't have one, we can set the profile picture path as the default value in the database field
i dont have separate functions for viewing default and actual profile pics. just if that field is NULL use that path else use the path which is in the record
if($pp == "null"){ return ""; } else{ return ""; }
the 2 functions that are there is one for the profile page and one for when a user profile is being viewed
I got you. But I doh find the default one working because I don't see the picture if I don't upload an image. So to avoid that, we can just set the default value of profilepicture
in the users table to defaultPP.jpg
then when they upload a new picture it'll update. What you think? The function for the other user's profile is fine.
lol it work trust me its just the DB have to REDO to reflect what we want..... Just make the profilepicture field nullable and default so once a record is made it will be set to null at first.... that is the null my function is looking for.. not null as in an empty field... null as in DB NULL
Lol ohh okay. I got you now. Well that's an easy fix
Add functionality to upload profile picture for the current user and display it in the header If no profile picture is uploaded then default profile picture is logo