Quote:
Originally Posted by xxweekxx
i have a mortgage form that posts submitted data to mysql.. however, somehow when users post in my mysql dbase it shows their ip as my server ip..
im using $_SERVER['REMOTE_ADDR'] but it still shows my server ip for every submission..
What do you suggest (btw this is shared hosting)
|
it sounds like maybe your doing the post from your server instead of the actual client, if so, and your using a server side script to actually post the form then the solution is to pass $_SERVER["REMOTE_ADDR"] as a variable in the form (so it gets set as a hidden input in the form), and then use that variable instead of $_SERVER["REMOTE_ADDR"] in your post processing code.