Ip adres to database

Home Forums Quform PHP Ip adres to database

This topic is: resolved
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #13356
    Frens
    Participant

    Hi ,

    How to store the ip adres in the database…………

    $config[‘extra’][‘IP address’] = Quform::getIPAddress();

    Thanks for comment

    #13359
    Frens
    Participant

    make 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;………….

    #13369
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #13371
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #13375
    Frens
    Participant

    Thank Ally,,works fine now !

    #13393
    Frens
    Participant

    Hi,

    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.
    #13422
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #13440
    Frens
    Participant

    Thanks Ally ,solved it all at this way

    $query.=” point = POINT({$latitude},{$longitude}), “;

    • This reply was modified 9 years, 11 months ago by Frens.
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy