Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

mysql/php helppp

Options
  • 06-12-2006 5:15pm
    #1
    Closed Accounts Posts: 5


    I am trying to do something that I thought would be very easy but its just not working out for me :mad:

    I have a list of entries from a table displayed to the user via php.
    For example:

    User TimeIn TimeOut Status
    Mary 09:10:23 17:34:12 Late
    Helan 09:08:13 10:51:31 Late
    Mary 08:54:36 20:45:23 Early

    But I want this user to be able to update the status herself for different people, ie:
    User TimeIn TimeOut Status
    Mary 09:10:23 17:34:12 Late (Drop down menu here where user can pick Late/Early/Arranged/Hols etc and this updates the mysql table)

    Im new to php/mysql, could anyone point me in the direction of where to start?

    Thanks so much!!!!!!!!!


Comments

  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    Well where you have late, you could have a drop down list and have a loop for each <select> statement and if it matches the one on the table row then make that the one thats selected by default.
    Then on the others you could have them goto a url like update.php?id=4242&status=Early or what ever.

    Think the SQL might look like:
    $id = $_GET;
    update `tablename` set `status` = 'Early' where `id` = '$id';

    Shouldn't be too complicated :)


Advertisement