I’m trying to find a way to set a cookie that sets a user’s IP and passes it to a second page displaying that IP. I’m probably missing something very small, but I’ve tried a few methods.
setcookie('user_ip', $_POST['user_ip']);
I should be able to use this function as well to find the IP, or is there another method that’s easier to use?
server($REMOTE_ADDR);
I keep getting errors with whatever method I use. I just know I’m missing something small.
Addition:
To echo the IP on the next page, use