Jump to content


Photo

Adding/Editing/Deleting from MySQL


  • Please log in to reply
1 reply to this topic

#1 Nate_

Nate_
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 01 August 2006 - 12:38 AM

So I'm trying to incorporate the google maps into my web site, and I want to be able to add markers to the map through the MySQL Database.  I've figured out how to connect the map to the database and bring up the markers.  It reads lattitude and longitude coordinates to place the marker.

Now, I need to create a PHP script that will easily add, edit, and delete tables to the MySQL database.

I've created the main table in the MySQL database, like so:
CREATE TABLE wholocations (
  id int(11) NOT NULL auto_increment,
  lat decimal(10,6) NOT NULL default '0.000000',
  lon decimal(10,6) NOT NULL default '0.000000',
  description varchar(255) NOT NULL default '',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

Now for adding, editing, deleting that stuff......i'm a little lost.

What i'd like to do is create one page.  When the page loads, it shows a list of every entry i've put in.  Next to each entry, a check box or radio button for "edit entry" and "delete entry"

At the bottom of the page, a place to put in new information to add to the table. 

Hope this makes sence, and I would appreciate the help!


#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 01 August 2006 - 02:36 AM

You might find phpMyEdit is ideal for generating the editor you need in a few seconds.

www.platon.sk
Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users