hello
happy xmas and new year , wish you all the best
as i am learning php , i find some times that i dont know how php works for things such as login
as i created a login form , and a code to process the form , i found out that i need validation , to make sure the entered data is not going to harm my scripts or it is the needed data
i found that i need to do something to make the user stay loged in and can do the stuff that the visitors can not do such as posting or reading special articles
i know sessions more complicated than cookies , and i see some websites have pages on google with session expired
cookies seems good , i know how to set a cookie with 1 varaible such as $value or #user , and i can have a cookie with the data that i need , for example i can put in a cookie a variable sent by the login form , $logged
my question is how to make the cookies store login data and how can i check the cookies to confirm the user is loged in ,
one more sub-question! how to add more variables .. i wnat to add if the user type = 1 ( admin ) and if the user name is $name (so link the his posts to his name ) and so
i think asking such advanced thing is not good , but as i am learning .. i want to know how things work and i know you are generous and willing to help and you are doing so already
thanks