Log in

View Full Version : admin page options.


Blaine0002
09-17-2005, 12:50 PM
im making an admin page to edit one of my hacks, how do i make a page get all the rows from a table in the database, and show yes/no boxes on my page with the defaults what they are currently in the database. also how would i go about updating the database with the updated options.

i know you start off with somthing like this

$blah = $db->query_first("
SELECT * FROM " . TABLE_PREFIX . "table");

but how do you get the yes/no radio buttons after that?

Marco van Herwaarden
09-17-2005, 12:59 PM
print_radio_row()

Blaine0002
09-17-2005, 01:06 PM
ah! thanks

still, ineed to know how to have those radio buttons update to the database... BTW marco i dont think there is a version 4.5.0 Beta3 of vbulletin :D

Alan @ CIT
09-20-2005, 07:09 PM
Blaine,

Take a look in admincp/options.php

Search for "if ($_POST['do'] == 'options')" - the code there displays the option rows
and "if ($_POST['do'] == 'dooptions')" - the code there saves the options

That should get you started.

Blaine0002
09-23-2005, 11:17 PM
just what i needed! thanks!