I have a little contact manager I am creating, and I have a function which I would like to set up.
Ok, so we have listed the number of customers, and I would like to be able star them, by clicking the icon, which then makes them available to a new list of just starred customers, which can later be unstarred.
Whats the best way to go about this?
I was thinking about adding a field to the users database, something like visible, and have either a 0 or 1 which will trigger 0 to be unstarred and 1 to be starred, would this be the best way to go about it?
This sounds like a good place to start, this is exactly what I needed, I myself am new at this, so trying to teach myself, but I knew this would be nice and simple to do, its just getting your head around what needs doing.
Ok, this script works fine for listing all the starred customers, but how can I now, make them star myself, so once they click on the star icon it then adds to the db as 1, and if unclicked changes it to 0.
I am guessing this will need an if statement, but how would I go about this next?
have a checkbox/radiobutton in your form, and the insert the data into your database as you would with the rest, so if selected it returns the value '1', and get it to POST this along with the rest of your data
What about unclicking it? because it is actually not a form I will be using it in, I will be using it from when my results are all shown, and I want to be able to click the image, and it does it for me, instead of a radio buttom and a submit button.