Jump to content

several questions.


aleminio

Recommended Posts

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 add
IF... 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.


Link to comment
https://forums.phpfreaks.com/topic/15543-several-questions/
Share on other sites

i have tried using
$_SESSION
but it does the same thing. when i run it with hamachi it shows.
127.0.0.1

when 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?
Link to comment
https://forums.phpfreaks.com/topic/15543-several-questions/#findComment-63319
Share on other sites

[quote author=aleminio link=topic=101740.msg403096#msg403096 date=1153827565]
i have tried using
$_SESSION
but it does the same thing. when i run it with hamachi it shows.
127.0.0.1

when 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).
Link to comment
https://forums.phpfreaks.com/topic/15543-several-questions/#findComment-63364
Share on other sites

[quote author=JA link=topic=101740.msg403144#msg403144 date=1153833467]
[quote author=aleminio link=topic=101740.msg403096#msg403096 date=1153827565]
i have tried using
$_SESSION
but it does the same thing. when i run it with hamachi it shows.
127.0.0.1

when 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.
Link to comment
https://forums.phpfreaks.com/topic/15543-several-questions/#findComment-63421
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.