Help with checkbox
Posted: Thu Aug 06, 2009 12:01 pm
Hi,
I am a web developer and i am going through the phase of learning php. I have a problem these days for which i am seeking a solution. If anyone of you can help i would be grateful. I am making an application in which i want to place a checkbox in the admin panel of the site. The work of the checkbox is that it shows a page on the front end. If the checkbox is checked the page shows up at the front end and if unchecked it does not.
The problem is that when i check the box it updated the database and the page starts showing up but the problem is that whenever the setting page is loaded again the checkbox becomes unchecked and their is no way to update the database.
Please help me to make a checkbox which should a show checked or unchecked depending upon the database value. I store 1 for checked in the database. I would be grateful if any of you guys can put the solution.
Regards
I am a web developer and i am going through the phase of learning php. I have a problem these days for which i am seeking a solution. If anyone of you can help i would be grateful. I am making an application in which i want to place a checkbox in the admin panel of the site. The work of the checkbox is that it shows a page on the front end. If the checkbox is checked the page shows up at the front end and if unchecked it does not.
The problem is that when i check the box it updated the database and the page starts showing up but the problem is that whenever the setting page is loaded again the checkbox becomes unchecked and their is no way to update the database.
Please help me to make a checkbox which should a show checked or unchecked depending upon the database value. I store 1 for checked in the database. I would be grateful if any of you guys can put the solution.
Regards