Jump to content


Photo

PHP + MYSQL Users system coding


  • Please log in to reply
2 replies to this topic

#1 rzer

rzer

    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 20 February 2014 - 09:12 AM

Hi everyone i have been trying to code a user system with email validation everything work the only problem is my validation page by default 0 is not validated and 1 is validated BUT when i try my code

its display the users control panel as if the users was validated even if she/he not 

 

in MYSQL the validated for my username is set to 0 and its return it as i where activated

 

Here a part code of the users only page

if ($logged[username] && $logged[validated] != "0"){ 
echo ("you are not validated"); 
}
else {
if ($logged[username] && $logged[validated] != "1"){
echo ("you are validated"); 


#2 Kyle

Kyle

    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 14 March 2014 - 10:25 AM

I think $logged['validated']!="0" should be $logged['validated']=="0"

 

== means is equal to

!= means not equal to

 

So in order to check if they are NOT validated you would want to see if $logged['validated']=="0" since 0 is the state in which they are not validated.



#3 Andersan

Andersan

    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 13 November 2014 - 01:53 AM

I'm currently looking for a tutorial of somesort... Im trying to make a logo for myself that looks something like thishttp://img.villageph...header-left.jpg

 






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users