Home › Forums › Quform PHP › Ip adres to database
- This topic has 7 replies, 2 voices, and was last updated 9 years, 11 months ago by Frens.
- AuthorPosts
- December 13, 2014 at 7:11 pm #13356FrensParticipant
Hi ,
How to store the ip adres in the database…………
$config[‘extra’][‘IP address’] = Quform::getIPAddress();
Thanks for comment
December 14, 2014 at 7:22 pm #13359FrensParticipantmake record in the database
In the process.php
$ip = $_SERVER[‘REMOTE_ADDR’];
and as query
$query .= “ip = ” . $ip . “,”;but got message
You have an error in your SQL syntax;………….
December 15, 2014 at 1:24 pm #13369AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
December 15, 2014 at 1:26 pm #13371AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
December 15, 2014 at 6:12 pm #13375FrensParticipantThank Ally,,works fine now !
December 17, 2014 at 8:57 pm #13393FrensParticipantHi,
I try the lat and longitude to store in the table
$user_ip = getenv(‘REMOTE_ADDR’);
$geo = unserialize(file_get_contents(“http://www.geoplugin.net/php.gp?ip=$user_ip”));
$latitude = $geo[“geoplugin_latitude”];
$longitude = $geo[“geoplugin_longitude”];
$coords = $geo[‘geoplugin_latitude’] .’, ‘. $geo[‘geoplugin_longitude’];$query .= “point = ‘” . $coords . “‘,”;
But got this error , someone an idea?
Cannot get geometry object from data you send to the GEOMETRY field- This reply was modified 9 years, 11 months ago by Frens.
December 21, 2014 at 12:58 pm #13422AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
December 22, 2014 at 12:11 pm #13440 - AuthorPosts
- You must be logged in to reply to this topic.