Jump to content


Photo

several questions.


  • Please log in to reply
6 replies to this topic

#1 aleminio

aleminio
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 24 July 2006 - 10:03 PM

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.




#2 JA

JA
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 24 July 2006 - 10:07 PM

Try $_SESSION['ip_address'] = $ip;

For getting the IP

#3 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 24 July 2006 - 10:08 PM


Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#4 aleminio

aleminio
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 24 July 2006 - 10:36 PM

thanks, usefull reading :)

#5 aleminio

aleminio
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 25 July 2006 - 11:39 AM

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?

#6 JA

JA
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 25 July 2006 - 01:17 PM

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?

make sure you've got session_start(); at the very top of the page (within php ofcourse).

#7 aleminio

aleminio
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 25 July 2006 - 03:03 PM

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?

make sure you've got session_start(); at the very top of the page (within php ofcourse).


indeed.
even when i open a simple page and all i write is this code, still i don't get the correct ip.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users