| |||||||
This is a discussion on Help with checkboxes and visual design within the PHP/MySQL section, part of the Programming category; Hi All I find I need some more help with something that should be very simple lol. I have a ...
![]() |
|
| | LinkBack | Thread Tools | Display Modes |
|
#1
| ||||
| ||||
|
Hi All I find I need some more help with something that should be very simple lol. I have a database table called `ideas` that I use to store any old idea that pops into my head that I don't want to forget...basically a dynamic scratchpad that can only be accessed from my "admin" page. The security is handled by secure session variable registration and the only way to become an admin member is by manually updating the `registered_users` table to reflect `group`='admin' The ideas table looks like this: -The content field is of type text- Code: +--------+-------------+--------------+------------------------------------+ | sec_id | content | status | TIMESTAMP | +----------+-----------+--------------+------------------------------------+ | 62 | an idea | 1 | 2009-02-25 00:24:04 | +----------+-----------+--------------+------------------------------------+ I have a text area that inserts the 'content' (which I mysql_real_escape_string before insertion) and I am able to display it back to the page with this: PHP Code: (thats why I have the status variable) that I can use to set the idea = done, edit the idea, or delete the idea entirely. I would also like to put each idea in a bordered area so they are visually separated. I think for editing the content, I can pull it from the table, display it in a text area, make my changes, and save it back to the same content row where the sec_id's will match. I also need to be able to handle the fact that puncuation (especially single quotes) can mess up my displaying of the ideas I really have no experience working with checkboxes (and very little experience dealing with forms in general) and I thought I would see if the good people here can lend a hand and maybe some brain power too ![]() I can provide more if anyone needs it. Thanks in advance.
__________________ Go placidly amid the noise and haste, and remember what peace there may be in silence The Desiderada Last edited by TaL; 26-02-2009 at 01:04 AM. Reason: fixed typeo |
|
#2
| ||||
| ||||
As Said by TaL I hope you are aware that checkboxes are used for multiple selection and radio buttons for a single selection. So wouldn't it make more sense if you use radio buttons, so that the user can choose ONLY ONE OPTION OUT OF THE THREE AT A TIME. You would either be editing or deleting it, not doing both at once right? I have an admin page for my site that I designed and is doing exactly what you want, however I'm not into any kind of buttons and all (as its solely for me), am just using simple text links to delete and edit.
__________________ Would you like to Link To Us | Support TECH6 by going Premium Know more about me at Vinayaks.com | Follow TECH6 at Twitter |
|
#3
| ||||
| ||||
|
I guess it is my total lack of experience with forms that made me think I needed check boxes. Perhaps you can show me an example of doing this with radio selections if it is not too much trouble? I agree that this does not need to be anything great as it is just for me. Also, any good sites for learning about form manipulation would be helpful. I have found some but none that were really any good for me to learn from.
__________________ Go placidly amid the noise and haste, and remember what peace there may be in silence The Desiderada Last edited by TaL; 26-02-2009 at 07:10 AM. Reason: fixed typeo |
|
#4
| ||||
| ||||
|
I think that you are right. Since this is just my page, I can do it with text links until I get more knowledge about using forms. Thanks for the advice
__________________ Go placidly amid the noise and haste, and remember what peace there may be in silence The Desiderada |
|
#5
| ||||
| ||||
| http://www.homeandlearn.co.uk/php/php4p10.html
__________________ Would you like to Link To Us | Support TECH6 by going Premium Know more about me at Vinayaks.com | Follow TECH6 at Twitter |
|
#6
| ||||
| ||||
|
Hey. When I decided to use the text link format, things fell right into place. I definitional need more practice working with forms but the text links are great for what I needed now. I have also changed around my tech tips page (to use the same kind database power as the scratch pad) to control the content of that page with the input for it on my admin page. It all has a very simple look but is very functional. I still have some issues to work out and I find I am not much of a front end designer but I find I can usually get what I need out of it and I am getting better and more confident with programming
__________________ Go placidly amid the noise and haste, and remember what peace there may be in silence The Desiderada |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |