Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Is there a way to record IP addresses with emails and orders?


kdogg

Recommended Posts

Posted

Just like the topic asks. When a customer places either an order or hits the contact us on my webpage, I would like all emails and orders to include IP address and host mask information. Even just the IP is better then nothing.

 

Is there a way to do this?

Posted

There is a contribution that does this for customers that have created an account it stores the IP number in with the other details that you can call.

 

The Contact us form,

Find (around line18)

Find

$name = tep_db_prepare_input($_POST['name']);

$email_address = tep_db_prepare_input($_POST['email']);

$phone = tep_db_prepare_input($_POST['phone']);

$enquiry = tep_db_prepare_input($_POST['enquiry']);

 

Add right after

 

$enquiry = tep_db_prepare_input($enquiry . "\n\n IP: " . $_SERVER['REMOTE_ADDR']);

 

Nic

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Posted

$_SERVER['REMOTE_ADDR'] doesn't always return a useful result. The osCommerce function tep_get_ip_address() is a more reliable way of getting an IP address.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted

If you want just to add the ip address, you can use the global variable: $ip_address; or $HTTP_SERVER_VARS['REMOTE_ADDR']

Erwin D. Padilla

Web Developer and Linux Admin

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...