Page 1 of 1

how to validate user already present

Posted: Tue Jul 01, 2008 2:15 am
by shuchitaumehta
by using javascript variable when i view source of the html page i can see whole db values in javascript variable

if i store in cookie i can also see this

pls let me know how to avoid this

thank you

Re: how to validate user already present

Posted: Tue Jul 01, 2008 3:13 am
by jaoudestudios
Use php instead of javascript. As it is server side no variables are displayed to the browser unless you echo it.

If you want to check if a user has already logged in from page to page then use a php session variable as it is global it is carrier from page to page.

Re: how to validate user already present

Posted: Tue Jul 01, 2008 5:56 am
by shuchitaumehta
jaoudestudios wrote:Use php instead of javascript. As it is server side no variables are displayed to the browser unless you echo it.

If you want to check if a user has already logged in from page to page then use a php session variable as it is global it is carrier from page to page.
Thank u for replay

but if i use php post/get method then i have to go with all the element in form & while returning have to put them
my form contains too many elements

also if i use post & reload page i get message
"The page you are trying to view contains POSTDATA..... with ok & cancel button"
i don't want this message
for end user it seems error

Re: how to validate user already present

Posted: Tue Jul 01, 2008 6:57 am
by jaoudestudios
yes it will question if the browser should resend the data if you are using POST vars, use GET method to avoid this.