<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Aug 23, 2008, at 12:20 AM, Robert Wolfe wrote:<span class="Apple-style-span" style="font-family: Arial; font-size: 10px; "></span></div><blockquote type="cite"><div><p align="LEFT"><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; "><span lang="en-us"><font size="2" face="Arial">What I want to do is once a user clicks on the</font></span><span lang="en-us"></span><span lang="en-us"> <font size="2" face="Arial">“</font></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Arial">Send</font></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Arial">”</font></span><span lang="en-us"></span><span lang="en-us"><font size="2" face="Arial"> button to send their login credentials, I want it to log the IP that they are connecting from to the MySQL database entry that has their information in it.&nbsp; My question is is how do I do this?&nbsp; Browser and OS information would be cool to log, too, for statistical purposes.</font></span></span></p></div></blockquote><div>That depends on your front-end language, not your specific database back-end. Any web environment will give you access to the standard CGI environment variables (or emulations thereof). See the CGI specification:</div><div><br></div><div><a href="http://hoohoo.ncsa.uiuc.edu/cgi/env.html">http://hoohoo.ncsa.uiuc.edu/cgi/env.html</a></div><div><br></div><div>You'll find all the information you need there. (REMOTE_HOST for IP; HTTP_USER_AGENT for browser/OS.)</div><div><br></div><div>For statistical work, though, you're better off using something like webalyzer with your web server's access logs. It works well enough, and without any additional work on your part.</div><div><br></div><div>Also, the IP address doesn't actually *mean* anything. It could by dynamic. It could be a proxy. Who knows? It's not good for authentication even for a single session; AOL users, for example, get bounced around to a dozen different proxies over the course of the same session. IMHO, recording an IP address is near-useless.</div><div><br></div><div>--&nbsp;</div><div><div>A: Because it messes up the order in which people normally read text.</div><div>Q: Why is top-posting such a bad thing?</div><div>A: Top-posting.</div><div>Q: What is the most annoying thing in email?</div></div></div></body></html>