In NateMail...aside from setting it to true, is there a secret to getting the "send IP address of visitor in email" to work?
Thank you Nate...I appreciate your hard work on this and that you have made it available to the rest of us. :D
send IP address variable
5 posts
• Page 1 of 1
This is what Nate told me what to do. First, is changing it to "true" not working?
Try this: add this code at the top of your script just after the opening <?php tag...
$_POST['visitor_ip'] = $_SERVER['REMOTE_ADDR']; ?$HTTP_POST_VARS['visitor_ip'] = $_POST['visitor_ip'];
If you have any problems, post back
Dirk
Try this: add this code at the top of your script just after the opening <?php tag...
$_POST['visitor_ip'] = $_SERVER['REMOTE_ADDR']; ?$HTTP_POST_VARS['visitor_ip'] = $_POST['visitor_ip'];
If you have any problems, post back
Dirk
- Dirk Williams
- Posts: 12
- Joined: 09/23/2005 @ 17:56
Yeah, you should be able to just set it to "true" in versions 3.0.9 - 3.0.11. Is it not working that way for you?
- Nate Baldwin
- Site Admin
- Posts: 3724
- Joined: 04/25/2003 @ 19:05
I'm using 3.0.10...downloaded it two days ago. Didn't see 3.0.11.
Dirk's method didn't work, with or without the question mark in it (with it, it gives a parse error).
And yeah...sorry to say, setting it to "true" isn't doing anything. Alas, it seemed so simple...:-)
Dirk's method didn't work, with or without the question mark in it (with it, it gives a parse error).
And yeah...sorry to say, setting it to "true" isn't doing anything. Alas, it seemed so simple...:-)
- rubycat
- Posts: 2
- Joined: 09/24/2005 @ 14:50
3.0.11 was uploaded over the weekend. You should be fine with 3.0.10 though.
Can't explain why setting the variable to true wouldn't work since it does work here, but here's the line of custom code you can try adding (just after the opening <?php line)...
Unless I just typed that wrong, it should work in both old and new versions of PHP. If it doesn't work, can you send me a copy of your script file using the contact form...
http://www.mindpalette.com/contact/
...and post back with a link to your form page?
Can't explain why setting the variable to true wouldn't work since it does work here, but here's the line of custom code you can try adding (just after the opening <?php line)...
- Code: Select all
$serverVars = (isset($_SERVER)) ? $_SERVER : $HTTP_SERVER_VARS;
$_POST['visitor_IP'] = (isset($serverVars['REMOTE_ADDR'])) ? $serverVars['REMOTE_ADDR'] : "(unknown)";
$HTTP_POST_VARS['visitor_IP'] = $_POST['visitor_IP'];
Unless I just typed that wrong, it should work in both old and new versions of PHP. If it doesn't work, can you send me a copy of your script file using the contact form...
http://www.mindpalette.com/contact/
...and post back with a link to your form page?
- Nate Baldwin
- Site Admin
- Posts: 3724
- Joined: 04/25/2003 @ 19:05
5 posts
• Page 1 of 1
Return to Form Processing (NateMail, ProcessForm)
Who is online
Users browsing this forum: No registered users and 1 guest