SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    best way to display mysql data that can be used to update mysql data

    Hi guys

    I want to know the best way of displaying records in a web page that can easily be updated or deleted. My thoughts have been displaying records in rows that can be clicked on (like hyperlinks), which then create a popup that lets you select whether to delete the record or update it. If you select update, this opens a window with the record information so you can update a field.

    My other thought is a button or two (separating the delete and update functions) next to each record that removes the extra step required above.

    Any suggestions

    Thanks for your help.

  2. #2
    Who turned the lights out !! Mandes's Avatar
    Join Date
    May 2005
    Location
    S.W. France
    Posts
    2,496
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I generally go for the records listed then put the functions on icons to the right, delete, modify etc.

    Dont forget to code in an 'are you sure' check on the delete function.
    A Little Knowledge Is A Very Dangerous Thing.......
    That Makes Me A Lethal Weapon !!!!!!!!

    Contract PHP Programming

  3. #3
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mandes View Post
    I generally go for the records listed then put the functions on icons to the right, delete, modify etc.

    Dont forget to code in an 'are you sure' check on the delete function.
    How would you include the 'are you sure' check??

    At the moment, i have two anchor links to the side of each record; 1 for update and 1 for delete. Both links include id variables of their associated record, which when clicked used another page to perform their functions.

    So for delete, click the link, stockdelete.php is called where i will have a query to delete the record in association with the carried 'id'.

    Where would the check be? On the anchor link or in the stockdelete.php page?

    Thanks

  4. #4
    SitePoint Enthusiast
    Join Date
    Apr 2012
    Posts
    99
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by chrisjwebb1978 View Post
    How would you include the 'are you sure' check??

    At the moment, i have two anchor links to the side of each record; 1 for update and 1 for delete. Both links include id variables of their associated record, which when clicked used another page to perform their functions.

    So for delete, click the link, stockdelete.php is called where i will have a query to delete the record in association with the carried 'id'.

    Where would the check be? On the anchor link or in the stockdelete.php page?

    Thanks
    you could use the onclick in the anchor tag. then use a javascript popup to confirm.


Tags for this Thread

Bookmarks

Posting Permissions

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