The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Making an edit entry form for a database

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #32365

    Hi Folks,

    I am just out of interest messing around with PHP trying to make a form which will edit an entry in the database. would this be the right way to go about it?

    What i’ve done is used the GET function to collect the ID of the entry then passed that into the form action URL


    Hello, I also had some problems with making the entry in database. I am not good in coding, so i spent plenty of time trying to write it corrrectly, but I just wasted my time. I asked my friend who recently made a great personal web site, and he advised me to find a program that will build a form itself, as for me, I found phpforms, and now everything is ok.


    What you have suggested seems fine.

    Just a quick bullet point list of things to do.

    The list is displayed somewhere. The URL has the ID of the entry in a get variable.
    In your page do a query to find all the info for that entry. the sql query would be something like

    Now run through the building the form inside a while loop. Use the while loop to fill in the form value fields.

    Now in the update page,
    Collect all the variables and name them properly.
    Now clean up the variables (Lookup sql injection if you’re not sure)
    Now update the table like
    UPDATE YOURTABLE SET field1=’$field1′, field2=’$field2′ WHERE ItemID=’$_GET

    And that should be that

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.