Editing Mysql table using simple Php code

Discussion in 'PHP' started by rhoula, Jul 28, 2013.

  1. #1
    Hello I have a table that has 5 fields, id, name, address, phone, country.

    I m looking for a way to be able to edit information from the table by using a simple form then re-sending information back to the Database.

    Any help would be appreciated.

    Thank you in advance.
     
    Solved! View solution.
    rhoula, Jul 28, 2013 IP
  2. Marcel Preda

    Marcel Preda Member

    Messages:
    21
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    43
    #2
    Hi there,

    I guess that myphpadmin is doing what you want, just google for it.

    BR,
    Marcel
     
    Marcel Preda, Jul 28, 2013 IP
  3. #3
    You seem to be a complete beginner, so I won't attempt to explain all required stuff that you need for such form, I am too lazy.

    This is the ugliest (and the only) example that I've found but it might do the job: http://www.phpeasystep.com/mysql/9.html
     
    Devtard, Jul 28, 2013 IP
  4. crazyblogger

    crazyblogger Active Member

    Messages:
    430
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    63
    #4
    You need to use UPDATE sql query to change the field in the database once you take the input from the user using your HTML form.
     
    crazyblogger, Jul 30, 2013 IP
  5. EmmanuelFlossie

    EmmanuelFlossie Active Member

    Messages:
    159
    Likes Received:
    11
    Best Answers:
    2
    Trophy Points:
    65
    #5
    As you can see tables in your database, i can assume your using a database cms

    Most likely phpmyadmin

    Editing is as simple as clicking on the edit button.

    Search is as simple as clicking on the search button and than select %-% if you want to match all with a particular query

    or just like for identical search query.
     
    EmmanuelFlossie, Jul 30, 2013 IP
  6. rhoula

    rhoula Well-Known Member

    Messages:
    875
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    145
    #6
    Thank you so much, the example you gave worked great. I had to make a lot of changes but over all I can't complain.
     
    rhoula, Jul 31, 2013 IP