Xibe
07-28-2007, 04:22 AM
I'm trying to add an option to my admin panel that will allow the admin to set an option by checkbox.
mqcheck.php (page that will be added to admin area):
<?php
include 'mqradio.php';
echo ('
<head>
<style type="text/css">
.style1 {
font-family: Verdana;
}
.style2 {
font-size: xx-small;
}
.style3 {
font-size: x-small;
}
</style>
</head>
<form method="post" action="mqradio.php">
<input type="checkbox" name="rmq" style="height: 20px" checked="checked"></span>Radio Marquee</span></span><br>
<input name="Submit1" type="submit" value="submit"></form>
<span class="style1"><span class="style2"> <br>
</span></span>')
?>
mqradio.php
<?php
$checked = $_POST['mrq'];
?>
I have two problems:
1.) This doesnt seem to work, because when I test it out, it wont set the value of the variable to either "on" (checked) or "off" (un-checked).
2.) After I've submitted the form it redirects me to a blank page (mqradio.php). I would like it to redirect me back to mqcheck.php, but if I add a redirect to mqradio, it screws up, because mqradio is included in mqcheck in the first place.
PLEASE HELP.
mqcheck.php (page that will be added to admin area):
<?php
include 'mqradio.php';
echo ('
<head>
<style type="text/css">
.style1 {
font-family: Verdana;
}
.style2 {
font-size: xx-small;
}
.style3 {
font-size: x-small;
}
</style>
</head>
<form method="post" action="mqradio.php">
<input type="checkbox" name="rmq" style="height: 20px" checked="checked"></span>Radio Marquee</span></span><br>
<input name="Submit1" type="submit" value="submit"></form>
<span class="style1"><span class="style2"> <br>
</span></span>')
?>
mqradio.php
<?php
$checked = $_POST['mrq'];
?>
I have two problems:
1.) This doesnt seem to work, because when I test it out, it wont set the value of the variable to either "on" (checked) or "off" (un-checked).
2.) After I've submitted the form it redirects me to a blank page (mqradio.php). I would like it to redirect me back to mqcheck.php, but if I add a redirect to mqradio, it screws up, because mqradio is included in mqcheck in the first place.
PLEASE HELP.