Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.