aleminio Posted July 24, 2006 Share Posted July 24, 2006 First of all, i have for example a registration form.what are the differents between POST and GET methods?? wont it do the same thing?how can i get user's ip? i addIF... submit... {$ip = getenv('REMOTE_ADDR');}and inserting the $ip into the database. but when i do that i think it inserts the server's ip and not the user's who submit.and how can i run a code at a certain time?if i want for example to clear a field at 12am without running a code manually.thank you. Quote Link to comment https://forums.phpfreaks.com/topic/15543-several-questions/ Share on other sites More sharing options...
JA Posted July 24, 2006 Share Posted July 24, 2006 Try $_SESSION['ip_address'] = $ip;For getting the IP Quote Link to comment https://forums.phpfreaks.com/topic/15543-several-questions/#findComment-63149 Share on other sites More sharing options...
effigy Posted July 24, 2006 Share Posted July 24, 2006 [list][*][url=http://www.cs.tut.fi/~jkorpela/forms/methods.html]GET/POST.[/url][*][url=http://us2.php.net/manual/en/reserved.variables.php#reserved.variables.server]$_SERVER variables.[/url][*]See "crontab" in my signature.[/list] Quote Link to comment https://forums.phpfreaks.com/topic/15543-several-questions/#findComment-63152 Share on other sites More sharing options...
aleminio Posted July 24, 2006 Author Share Posted July 24, 2006 thanks, usefull reading :) Quote Link to comment https://forums.phpfreaks.com/topic/15543-several-questions/#findComment-63161 Share on other sites More sharing options...
aleminio Posted July 25, 2006 Author Share Posted July 25, 2006 i have tried using $_SESSIONbut it does the same thing. when i run it with hamachi it shows.127.0.0.1when i upload it, and people submit the form, it shows the same ip.only the last digit changes sometimes.i guess it's the server's ip.and how can i open the crontab command line in the server i uploaded the files to? Quote Link to comment https://forums.phpfreaks.com/topic/15543-several-questions/#findComment-63319 Share on other sites More sharing options...
JA Posted July 25, 2006 Share Posted July 25, 2006 [quote author=aleminio link=topic=101740.msg403096#msg403096 date=1153827565]i have tried using $_SESSIONbut it does the same thing. when i run it with hamachi it shows.127.0.0.1when i upload it, and people submit the form, it shows the same ip.only the last digit changes sometimes.i guess it's the server's ip.and how can i open the crontab command line in the server i uploaded the files to?[/quote]make sure you've got session_start(); at the very top of the page (within php ofcourse). Quote Link to comment https://forums.phpfreaks.com/topic/15543-several-questions/#findComment-63364 Share on other sites More sharing options...
aleminio Posted July 25, 2006 Author Share Posted July 25, 2006 [quote author=JA link=topic=101740.msg403144#msg403144 date=1153833467][quote author=aleminio link=topic=101740.msg403096#msg403096 date=1153827565]i have tried using $_SESSIONbut it does the same thing. when i run it with hamachi it shows.127.0.0.1when i upload it, and people submit the form, it shows the same ip.only the last digit changes sometimes.i guess it's the server's ip.and how can i open the crontab command line in the server i uploaded the files to?[/quote]make sure you've got session_start(); at the very top of the page (within php ofcourse).[/quote]indeed.even when i open a simple page and all i write is this code, still i don't get the correct ip. Quote Link to comment https://forums.phpfreaks.com/topic/15543-several-questions/#findComment-63421 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.