DeathStar Posted February 6, 2007 Share Posted February 6, 2007 Hi i want to create a login page.. one of the futures i want to put in is that the script will automatically fill in your user name in a text box if you have registered. then you just enter the password. here's the part where i need help! I want it to get the user name from the ip if it exists in the database. any help would be good!. Link to comment https://forums.phpfreaks.com/topic/37354-get-the-user_name-by-ip/ Share on other sites More sharing options...
fenway Posted February 6, 2007 Share Posted February 6, 2007 That's a very bad, bad idea... thousands of users can have the same ip. Link to comment https://forums.phpfreaks.com/topic/37354-get-the-user_name-by-ip/#findComment-178572 Share on other sites More sharing options...
artacus Posted February 6, 2007 Share Posted February 6, 2007 MUCH better off using a cookie if you want to do that. Link to comment https://forums.phpfreaks.com/topic/37354-get-the-user_name-by-ip/#findComment-178600 Share on other sites More sharing options...
DeathStar Posted February 7, 2007 Author Share Posted February 7, 2007 hmm.. doesnt each pc have thier own uniqe ip?? how would i do it with a cookie? Link to comment https://forums.phpfreaks.com/topic/37354-get-the-user_name-by-ip/#findComment-179008 Share on other sites More sharing options...
fenway Posted February 7, 2007 Share Posted February 7, 2007 hmm.. doesnt each pc have thier own uniqe ip?? how would i do it with a cookie? Not if they're behind a firewall/router/gateway/etc. At best, you can uniquely identify visitors with session IDs (stored in a cookie, as artacus suggested). Link to comment https://forums.phpfreaks.com/topic/37354-get-the-user_name-by-ip/#findComment-179209 Share on other sites More sharing options...
DeathStar Posted February 12, 2007 Author Share Posted February 12, 2007 oh yea i forgot about proxy's :s ill think ill do it with a cookie Link to comment https://forums.phpfreaks.com/topic/37354-get-the-user_name-by-ip/#findComment-182676 Share on other sites More sharing options...
worldworld Posted February 12, 2007 Share Posted February 12, 2007 You can do it with sessions too.. Link to comment https://forums.phpfreaks.com/topic/37354-get-the-user_name-by-ip/#findComment-182705 Share on other sites More sharing options...
DeathStar Posted February 13, 2007 Author Share Posted February 13, 2007 How? Link to comment https://forums.phpfreaks.com/topic/37354-get-the-user_name-by-ip/#findComment-183571 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.