简体   繁体   中英

save data regarding unregistered users without using session or cookie

Yesterday i went for an interview. There they asked.

"Suppose you have a registration form with no unique attribute for email or username. And a person tries fill the registration form again and again.How to keep the track of user weather he has already filled the form or not. You have to save all the data regarding the users "Even the unregistered one too" for the companies future use. How will you do it without using session and cookies ?"

Till now i have heard about these two methods only. Is there any other method or it was just a tricky one ?

I'm not sure if I fully understand your question but it sounds like you want to keep track of how many times a certain person fills out a web form.

I would grab their IP Address using this function:

$ip = $_SERVER['REMOTE_ADDR'];

Then, make a new entry in your SQL database for every submittal of the form. Each entry could have a row in SQL with the IP Address, Email, Name etc.

You can then analyze SQL for whatever information you need.

Does this answer your question?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM