dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Little form to insert in to database

  1. #1
    Join Date
    Jun 2011
    Posts
    141

    Little form to insert in to database

    I have a table in a database for my google map markers and each time my site gets a new members, I have to update my csv file and import to the database which is a pain.

    I would like to have a hidden page on my site with a very simple form so that I can just insert the latitude and longitude and it will automatically add it to my table so I dont need to log in to my cPanel at all.

    My table is called "markers" and has 4 columns, ID which is the primary key, lat for latitude, lng for longitude and type which just has "member" for every entry (in case I want a different marker to show something different on the map in future)

    Would someone please be able to advise me how I can do this?

    Thanks.

  2. #2
    Join Date
    Feb 2012
    Location
    youTUBE
    Posts
    234
    You have to automate everything you do manually, a few more tasks to perform onNewUser().
    (0) // start
    (1) $fp=fopen(CSVfile,"a+"); //This function on production machines have restrictions..
    (2) $rc=fprintf($fp,$CSVformat,$v1,$v2...); //check for error ect.
    (3) fclose($fp);
    (3) Add location pair(lat,lng) to table markers in database, for user, using ID, having features, type.
    (4) Continue...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles