Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×

help with php script

Recommended Posts

please help

what i need to do is to have a list of 8 checkbuttons with a maxinum of 3 buttons being checked when

you click a combinations of 3 buttons i wont then to connect to my Sql database and produce a query

of the 3 and display in a html page.

i hope i have made this clear and thanks for your help


Link to comment
Share on other sites

sorry for the deley in getting back

this is basically what i need but instead of going to a webpage i need to query a database if you click on tennis and

football and boxing to find all collages that does tennis and football and boxing 3 will be the maxium of sports you could choose

if ($_POST['tennis']=="1" OR $_POST['reading']=="1" OR $_POST['basketball']=="1" OR $_POST['boxing']=="1" OR $_POST['football']=="1" OR $_POST['cricket']=="1") {
if ($_POST['tennis']=="1" AND $_POST['reading']=="1" AND $_POST['boxing']=="1") {
header('Location: [url="http://www.tennisreadingandboxing.com'%3b%29;"]http://www.tennisreadingandboxing.com');[/url]
if ($_POST['tennis']=="1" AND $_POST['reading']=="1") {
header('Location: [url="http://www.tennisandreading.com'%3b%29;"]http://www.tennisandreading.com');[/url]
} else {
<form id="myform" class="cssform" action="<?php echo $SERVER['PHP_SELF']; ?>" method="POST">
<label for="comments">Hobbies:</label><br>
<input type="checkbox" value="1" name="tennis" class="threepxfix" /> Tennis<br />
<input type="checkbox" value="1" name="reading" class="threepxfix" /> Reading <br />
<input type="checkbox" value="1" name="basketball" class="threepxfix" /> Basketball <br />
<input type="checkbox" value="1" name="boxing" class="threepxfix" /> Boxing<br />
<input type="checkbox" value="1" name="football" class="threepxfix" /> Football<br />
<input type="checkbox" value="1" name="cricket" class="threepxfix" /> Cricket <br />
<div style="margin-left: 150px;">
<input type="submit" value="Submit">
<input type="reset" value="reset" />


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...