need php checkbox help PRONTO!
- BomWatchout
- Newbie


- Joined: Sep 20, 2010
- Posts: 12
- Status: Offline
I want to create a php checkbox tutorial for my forum soon as possible. I have alot of messages from eveyone in the forum and that just consumes alot of my bandwidth. So, instead of doing something about stopping those messages i want to create that tutorial. The problem I am having with it right now is that i want to start it up with a few questions, using the checkboxes, in the checkboxes i want to have the problems they are getting. Once they click the "submit" buttum i want the tutorial to open one of several pages i have ready to solve them.
To put it more clear. Depending on what they choose from the checkboxes, they will get a different page once they click "submit". for example if they check box1, box2 and box3 then submit, they will be redirected to a different place than then one they will be if they check the box1 and box2.
To put it more clear. Depending on what they choose from the checkboxes, they will get a different page once they click "submit". for example if they check box1, box2 and box3 then submit, they will be redirected to a different place than then one they will be if they check the box1 and box2.
- Anonymous
- Bot


- Joined: 25 Feb 2008
- Posts: ?
- Loc: Ozzuland
- Status: Online
September 20th, 2010, 3:54 pm
- Bogey
- Bogey


- Joined: Jul 14, 2005
- Posts: 8212
- Loc: USA
- Status: Offline
Form.html
tutorial.php
This approach will do the following.
You have 3 checkboxes. For each possibility you will have a page.
There are 6 different pages that to be made:
tutorial_0
tutorial_1
tutorial_2
tutorial_01
tutorial_02
tutorial_12
This is in no way the best solution because I'm not thinking well right now.
HTML Code: [ Select ]
<form method="post" action="tutorial.php">
Check Name 1 <input type="checkbox" name="Check_Name[]" />
Check Name 2 <input type="checkbox" name="Check_Name[]" />
Check Name 3 <input type="checkbox" name="Check_Name[]" />
<input type="submit" name="Submit" /></form>
Check Name 1 <input type="checkbox" name="Check_Name[]" />
Check Name 2 <input type="checkbox" name="Check_Name[]" />
Check Name 3 <input type="checkbox" name="Check_Name[]" />
<input type="submit" name="Submit" /></form>
- <form method="post" action="tutorial.php">
- Check Name 1 <input type="checkbox" name="Check_Name[]" />
- Check Name 2 <input type="checkbox" name="Check_Name[]" />
- Check Name 3 <input type="checkbox" name="Check_Name[]" />
- <input type="submit" name="Submit" /></form>
tutorial.php
PHP Code: [ Select ]
<?php
if(isset($_POST['submit']))
{
$p = null;
if(isset($_POST[check_name[0]]))
{
$p .= '0';
}
if(isset($_POST[check_name[1]))
{
$p .= '1';
}
if(isset($_POST[check_name[2]))
{
$p .= '2';
}
if(!isset($_POST[check_name[0]) && !isset($_POST[check_name[1]) && !isset($_POST[check_name[2]))
{
$p = '012';
}
$page = "tutorial_$p";
// Now you redirect the user to $page
}
?>
if(isset($_POST['submit']))
{
$p = null;
if(isset($_POST[check_name[0]]))
{
$p .= '0';
}
if(isset($_POST[check_name[1]))
{
$p .= '1';
}
if(isset($_POST[check_name[2]))
{
$p .= '2';
}
if(!isset($_POST[check_name[0]) && !isset($_POST[check_name[1]) && !isset($_POST[check_name[2]))
{
$p = '012';
}
$page = "tutorial_$p";
// Now you redirect the user to $page
}
?>
- <?php
- if(isset($_POST['submit']))
- {
- $p = null;
- if(isset($_POST[check_name[0]]))
- {
- $p .= '0';
- }
- if(isset($_POST[check_name[1]))
- {
- $p .= '1';
- }
- if(isset($_POST[check_name[2]))
- {
- $p .= '2';
- }
- if(!isset($_POST[check_name[0]) && !isset($_POST[check_name[1]) && !isset($_POST[check_name[2]))
- {
- $p = '012';
- }
- $page = "tutorial_$p";
- // Now you redirect the user to $page
- }
- ?>
This approach will do the following.
You have 3 checkboxes. For each possibility you will have a page.
There are 6 different pages that to be made:
tutorial_0
tutorial_1
tutorial_2
tutorial_01
tutorial_02
tutorial_12
This is in no way the best solution because I'm not thinking well right now.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
- BomWatchout
- Newbie


- Joined: Sep 20, 2010
- Posts: 12
- Status: Offline
thanks alot for the coding. One last thing i want to ask? I am not that good at php, how can i redirect a user to a string value without them having to click any links?
I mean, from that .php file, just open then $page string once the value for it had been defined.
I also get a parse error in line 5, not sure exactly what it is...
I mean, from that .php file, just open then $page string once the value for it had been defined.
Code: [ Select ]
..if(!isset($_POST[check_name[0]) && !isset($_POST[check_name[1]) && !isset($_POST[check_name[2]))
{
$p = '012';
}
$page = "tutorial_$p"; <-- [here]
// Now you redirect the user to $page
...
{
$p = '012';
}
$page = "tutorial_$p"; <-- [here]
// Now you redirect the user to $page
...
- ..if(!isset($_POST[check_name[0]) && !isset($_POST[check_name[1]) && !isset($_POST[check_name[2]))
- {
- $p = '012';
- }
- $page = "tutorial_$p"; <-- [here]
- // Now you redirect the user to $page
- ...
I also get a parse error in line 5, not sure exactly what it is...
- Bogey
- Bogey


- Joined: Jul 14, 2005
- Posts: 8212
- Loc: USA
- Status: Offline
This code has to be before the header or anything.
I'm pretty sure it is
PHP Code: [ Select ]
<?php
header("LOCATION: $page");
?>
header("LOCATION: $page");
?>
- <?php
- header("LOCATION: $page");
- ?>
I'm pretty sure it is
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
- BomWatchout
- Newbie


- Joined: Sep 20, 2010
- Posts: 12
- Status: Offline
I am still getting parse error with the tutorial.php code you provided, can't find the exact place of the error, just know is in line 5..
Code: [ Select ]
<?php
if(isset($_POST['submit']))
{
$p = null;
if(isset($_POST[check_name[0]]))
{
$p .= '0';
}
if(isset($_POST[check_name[1]))
{
$p .= '1';
}
if(isset($_POST[check_name[2]))
{
$p .= '2';
}
if(!isset($_POST[check_name[0]) && !isset($_POST[check_name[1]) && !isset($_POST[check_name[2]))
{
$p = '012';
}
$page = "tutorial_$p";
// Now you redirect the user to $page
}
?>
if(isset($_POST['submit']))
{
$p = null;
if(isset($_POST[check_name[0]]))
{
$p .= '0';
}
if(isset($_POST[check_name[1]))
{
$p .= '1';
}
if(isset($_POST[check_name[2]))
{
$p .= '2';
}
if(!isset($_POST[check_name[0]) && !isset($_POST[check_name[1]) && !isset($_POST[check_name[2]))
{
$p = '012';
}
$page = "tutorial_$p";
// Now you redirect the user to $page
}
?>
- <?php
- if(isset($_POST['submit']))
- {
- $p = null;
- if(isset($_POST[check_name[0]]))
- {
- $p .= '0';
- }
- if(isset($_POST[check_name[1]))
- {
- $p .= '1';
- }
- if(isset($_POST[check_name[2]))
- {
- $p .= '2';
- }
- if(!isset($_POST[check_name[0]) && !isset($_POST[check_name[1]) && !isset($_POST[check_name[2]))
- {
- $p = '012';
- }
- $page = "tutorial_$p";
- // Now you redirect the user to $page
- }
- ?>
- righteous_trespasser
- Scuffle


- Joined: Mar 12, 2007
- Posts: 6228
- Loc: South-Africa
- Status: Offline
- Bogey
- Bogey


- Joined: Jul 14, 2005
- Posts: 8212
- Loc: USA
- Status: Offline
- BomWatchout
- Newbie


- Joined: Sep 20, 2010
- Posts: 12
- Status: Offline
sorry for my delay answering... my forum went down so I guess there wont be any hurries to get the codes now 
ok so, so far what i have is this
Form.html
tutorial.php
Now i get this error for tutorial.php:
Parse error: parse error, expecting `','' or `')'' on line 6
Yesterday, I was making some research on this and found something close to what I'm looking for. I think that the only thing I have to fix is the outcome after people hit submit:
Tutorial.php
checkbox-control.php
This will just echo back what you selected. I want the checkbox-control.php to automatically generate a link to one of my tutorials depending on what the people checked in tutorial.php just like Bogey was doing
ok so, so far what i have is this
Form.html
Code: [ Select ]
<form method="post" action="tutorial.php">
Check Name 1 <input type="checkbox" name="Check_Name[]" />
Check Name 2 <input type="checkbox" name="Check_Name[]" />
Check Name 3 <input type="checkbox" name="Check_Name[]" />
<input type="submit" name="Submit" /></form>
Check Name 1 <input type="checkbox" name="Check_Name[]" />
Check Name 2 <input type="checkbox" name="Check_Name[]" />
Check Name 3 <input type="checkbox" name="Check_Name[]" />
<input type="submit" name="Submit" /></form>
- <form method="post" action="tutorial.php">
- Check Name 1 <input type="checkbox" name="Check_Name[]" />
- Check Name 2 <input type="checkbox" name="Check_Name[]" />
- Check Name 3 <input type="checkbox" name="Check_Name[]" />
- <input type="submit" name="Submit" /></form>
tutorial.php
Code: [ Select ]
<?php
header("LOCATION: $page");
if(isset($_POST['submit']))
{
$p = null;
if(isset($_POST['check_name'][0]]))
{
$p .= '0';
}
if(isset($_POST['check_name'][1]))
{
$p .= '1';
}
if(isset($_POST['check_name'][2]))
{
$p .= '2';
}
if(!isset($_POST['check_name'][0]) && !isset($_POST['check_name'][1]) && !isset($_POST['check_name'][2]))
{
$p = '012';
}
$page = "tutorial_$p";
}
?>
header("LOCATION: $page");
if(isset($_POST['submit']))
{
$p = null;
if(isset($_POST['check_name'][0]]))
{
$p .= '0';
}
if(isset($_POST['check_name'][1]))
{
$p .= '1';
}
if(isset($_POST['check_name'][2]))
{
$p .= '2';
}
if(!isset($_POST['check_name'][0]) && !isset($_POST['check_name'][1]) && !isset($_POST['check_name'][2]))
{
$p = '012';
}
$page = "tutorial_$p";
}
?>
- <?php
- header("LOCATION: $page");
- if(isset($_POST['submit']))
- {
- $p = null;
- if(isset($_POST['check_name'][0]]))
- {
- $p .= '0';
- }
- if(isset($_POST['check_name'][1]))
- {
- $p .= '1';
- }
- if(isset($_POST['check_name'][2]))
- {
- $p .= '2';
- }
- if(!isset($_POST['check_name'][0]) && !isset($_POST['check_name'][1]) && !isset($_POST['check_name'][2]))
- {
- $p = '012';
- }
- $page = "tutorial_$p";
- }
- ?>
Now i get this error for tutorial.php:
Parse error: parse error, expecting `','' or `')'' on line 6
Yesterday, I was making some research on this and found something close to what I'm looking for. I think that the only thing I have to fix is the outcome after people hit submit:
Tutorial.php
Code: [ Select ]
<form action="checkbox-control.php" method="post">
Please, check all the boxes that applies to your current sitiation:<br /><br />
<input type="checkbox" name="problem[]" value="A" />Problem 1.<br />
<input type="checkbox" name="problem[]" value="B" />Problem 2.<br />
<input type="checkbox" name="problem[]" value="C" />Problem 3.<br />
<input type="checkbox" name="problem[]" value="D" />Problem 4.<br />
<input type="checkbox" name="problem[]" value="E" />Problem 5.<br />
<input type="checkbox" name="problem[]" value="F" />Problem 6.<br />
<input type="checkbox" name="problem[]" value="G" />Problem 7.<br />
<input type="checkbox" name="problem[]" value="H" />Problem 8.<br />
<input type="checkbox" name="problem[]" value="I" />Problem 9.<br />
<input type="checkbox" name="problem[]" value="J" />Problem 10.<br />
<center><input type="submit" name="formSubmit" value="Submit" /></center><br /><br />
<br /> If your problem is not listed here then please let me know so.<br />
</form>
Please, check all the boxes that applies to your current sitiation:<br /><br />
<input type="checkbox" name="problem[]" value="A" />Problem 1.<br />
<input type="checkbox" name="problem[]" value="B" />Problem 2.<br />
<input type="checkbox" name="problem[]" value="C" />Problem 3.<br />
<input type="checkbox" name="problem[]" value="D" />Problem 4.<br />
<input type="checkbox" name="problem[]" value="E" />Problem 5.<br />
<input type="checkbox" name="problem[]" value="F" />Problem 6.<br />
<input type="checkbox" name="problem[]" value="G" />Problem 7.<br />
<input type="checkbox" name="problem[]" value="H" />Problem 8.<br />
<input type="checkbox" name="problem[]" value="I" />Problem 9.<br />
<input type="checkbox" name="problem[]" value="J" />Problem 10.<br />
<center><input type="submit" name="formSubmit" value="Submit" /></center><br /><br />
<br /> If your problem is not listed here then please let me know so.<br />
</form>
- <form action="checkbox-control.php" method="post">
- Please, check all the boxes that applies to your current sitiation:<br /><br />
- <input type="checkbox" name="problem[]" value="A" />Problem 1.<br />
- <input type="checkbox" name="problem[]" value="B" />Problem 2.<br />
- <input type="checkbox" name="problem[]" value="C" />Problem 3.<br />
- <input type="checkbox" name="problem[]" value="D" />Problem 4.<br />
- <input type="checkbox" name="problem[]" value="E" />Problem 5.<br />
- <input type="checkbox" name="problem[]" value="F" />Problem 6.<br />
- <input type="checkbox" name="problem[]" value="G" />Problem 7.<br />
- <input type="checkbox" name="problem[]" value="H" />Problem 8.<br />
- <input type="checkbox" name="problem[]" value="I" />Problem 9.<br />
- <input type="checkbox" name="problem[]" value="J" />Problem 10.<br />
- <center><input type="submit" name="formSubmit" value="Submit" /></center><br /><br />
- <br /> If your problem is not listed here then please let me know so.<br />
- </form>
checkbox-control.php
Code: [ Select ]
<?php
$pro = $_POST['problem'];
if(empty($pro))
{
echo("You got this error because you didnt select any issue.<br />
Please, click the back bottom and recheck your issues.");
}
else
{
$N = count($pro);
echo("You selected $N issues(s) in your computer: ");
for($i=0; $i < $N; $i++)
{
echo($pro[$i] . " ");
}
}
?> <br /><br />
Based on what you choosed, we recommend the following tutorial for you<br />
<a href="link to tutorial here">sample</a>
$pro = $_POST['problem'];
if(empty($pro))
{
echo("You got this error because you didnt select any issue.<br />
Please, click the back bottom and recheck your issues.");
}
else
{
$N = count($pro);
echo("You selected $N issues(s) in your computer: ");
for($i=0; $i < $N; $i++)
{
echo($pro[$i] . " ");
}
}
?> <br /><br />
Based on what you choosed, we recommend the following tutorial for you<br />
<a href="link to tutorial here">sample</a>
- <?php
- $pro = $_POST['problem'];
- if(empty($pro))
- {
- echo("You got this error because you didnt select any issue.<br />
- Please, click the back bottom and recheck your issues.");
- }
- else
- {
- $N = count($pro);
- echo("You selected $N issues(s) in your computer: ");
- for($i=0; $i < $N; $i++)
- {
- echo($pro[$i] . " ");
- }
- }
- ?> <br /><br />
- Based on what you choosed, we recommend the following tutorial for you<br />
- <a href="link to tutorial here">sample</a>
This will just echo back what you selected. I want the checkbox-control.php to automatically generate a link to one of my tutorials depending on what the people checked in tutorial.php just like Bogey was doing
- Bogey
- Bogey


- Joined: Jul 14, 2005
- Posts: 8212
- Loc: USA
- Status: Offline
PHP Code: [ Select ]
if(isset($_POST['check_name'][0]]))
The last ' ] ' is extra
I'm sorry, the header("LOCAT..... thing needs to be right after you define $page.
I meant that it needs to go before any HTML. It can go after PHP but not before any HTML.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
- BomWatchout
- Newbie


- Joined: Sep 20, 2010
- Posts: 12
- Status: Offline
I am feeling kinda embarrassed to ask you this but can you please tell me how i can fix the one I am currently working on? yours is good but I already started working on this one:
Tutorial.php
checkbox-control.php
..and yes, I have about 10 reported problems. Thank you for your time
Tutorial.php
Code: [ Select ]
<form action="checkbox-control.php" method="post">
Please, check all the boxes that applies to your current sitiation:<br /><br />
<input type="checkbox" name="problem[]" value="A" />Problem 1.<br />
<input type="checkbox" name="problem[]" value="B" />Problem 2.<br />
<input type="checkbox" name="problem[]" value="C" />Problem 3.<br />
<input type="checkbox" name="problem[]" value="D" />Problem 4.<br />
<input type="checkbox" name="problem[]" value="E" />Problem 5.<br />
<input type="checkbox" name="problem[]" value="F" />Problem 6.<br />
<input type="checkbox" name="problem[]" value="G" />Problem 7.<br />
<input type="checkbox" name="problem[]" value="H" />Problem 8.<br />
<input type="checkbox" name="problem[]" value="I" />Problem 9.<br />
<input type="checkbox" name="problem[]" value="J" />Problem 10.<br />
<center><input type="submit" name="formSubmit" value="Submit" /></center><br /><br />
<br /> If your problem is not listed here then please let me know so.<br />
</form>
Please, check all the boxes that applies to your current sitiation:<br /><br />
<input type="checkbox" name="problem[]" value="A" />Problem 1.<br />
<input type="checkbox" name="problem[]" value="B" />Problem 2.<br />
<input type="checkbox" name="problem[]" value="C" />Problem 3.<br />
<input type="checkbox" name="problem[]" value="D" />Problem 4.<br />
<input type="checkbox" name="problem[]" value="E" />Problem 5.<br />
<input type="checkbox" name="problem[]" value="F" />Problem 6.<br />
<input type="checkbox" name="problem[]" value="G" />Problem 7.<br />
<input type="checkbox" name="problem[]" value="H" />Problem 8.<br />
<input type="checkbox" name="problem[]" value="I" />Problem 9.<br />
<input type="checkbox" name="problem[]" value="J" />Problem 10.<br />
<center><input type="submit" name="formSubmit" value="Submit" /></center><br /><br />
<br /> If your problem is not listed here then please let me know so.<br />
</form>
- <form action="checkbox-control.php" method="post">
- Please, check all the boxes that applies to your current sitiation:<br /><br />
- <input type="checkbox" name="problem[]" value="A" />Problem 1.<br />
- <input type="checkbox" name="problem[]" value="B" />Problem 2.<br />
- <input type="checkbox" name="problem[]" value="C" />Problem 3.<br />
- <input type="checkbox" name="problem[]" value="D" />Problem 4.<br />
- <input type="checkbox" name="problem[]" value="E" />Problem 5.<br />
- <input type="checkbox" name="problem[]" value="F" />Problem 6.<br />
- <input type="checkbox" name="problem[]" value="G" />Problem 7.<br />
- <input type="checkbox" name="problem[]" value="H" />Problem 8.<br />
- <input type="checkbox" name="problem[]" value="I" />Problem 9.<br />
- <input type="checkbox" name="problem[]" value="J" />Problem 10.<br />
- <center><input type="submit" name="formSubmit" value="Submit" /></center><br /><br />
- <br /> If your problem is not listed here then please let me know so.<br />
- </form>
checkbox-control.php
Code: [ Select ]
<?php
$pro = $_POST['problem'];
if(empty($pro))
{
echo("You got this error because you didnt select any issue.<br />
Please, click the back bottom and recheck your issues.");
}
else
{
$N = count($pro);
echo("You selected $N issues(s) in your computer: ");
for($i=0; $i < $N; $i++)
{
echo($pro[$i] . " ");
}
}
?> <br /><br />
Based on what you choosed, we recommend the following tutorial for you<br />
<a href="link to tutorial here">sample</a>
$pro = $_POST['problem'];
if(empty($pro))
{
echo("You got this error because you didnt select any issue.<br />
Please, click the back bottom and recheck your issues.");
}
else
{
$N = count($pro);
echo("You selected $N issues(s) in your computer: ");
for($i=0; $i < $N; $i++)
{
echo($pro[$i] . " ");
}
}
?> <br /><br />
Based on what you choosed, we recommend the following tutorial for you<br />
<a href="link to tutorial here">sample</a>
- <?php
- $pro = $_POST['problem'];
- if(empty($pro))
- {
- echo("You got this error because you didnt select any issue.<br />
- Please, click the back bottom and recheck your issues.");
- }
- else
- {
- $N = count($pro);
- echo("You selected $N issues(s) in your computer: ");
- for($i=0; $i < $N; $i++)
- {
- echo($pro[$i] . " ");
- }
- }
- ?> <br /><br />
- Based on what you choosed, we recommend the following tutorial for you<br />
- <a href="link to tutorial here">sample</a>
..and yes, I have about 10 reported problems. Thank you for your time
- Bogey
- Bogey


- Joined: Jul 14, 2005
- Posts: 8212
- Loc: USA
- Status: Offline
Well, if it's ten problems you don't want to make like 100 different pages 
Alright. I got another possible solution for you. It requires a bit more PHP though.
This one's a bit different then the other one.
For each problem you have a tutorial on how to fix something. Problem 1 would be check box #1, problem 2 would be check box #2 and so on...
Remember that in this way, you are including the contents of one page inside of another page, so in the problem_1.html through problem_10.html all you put in there is the tutorial... the body. No <html><head><body> tags or anything like that.
I'm also not sure if this is suitable to your needs.
(I'm also not 100% sure about the PHP... it should work, but if it brings up errors... well, post it here if you can't fix them).
Alright. I got another possible solution for you. It requires a bit more PHP though.
This one's a bit different then the other one.
For each problem you have a tutorial on how to fix something. Problem 1 would be check box #1, problem 2 would be check box #2 and so on...
PHP Code: [ Select ]
<?php
$pro = $_POST['problem'];
if(empty($pro))
{
echo "You got this error because you didn't select any issue.<br />
Please, click the back bottom and recheck your issues."
}
else
{
$N = count($pro) + 2;
echo "You selected $N issues(s) in your computer: ";
for($i=1; $i < $N; $i++)
{
include "path/to/tutorials/problem_{$i}.html";
}
}
?>
$pro = $_POST['problem'];
if(empty($pro))
{
echo "You got this error because you didn't select any issue.<br />
Please, click the back bottom and recheck your issues."
}
else
{
$N = count($pro) + 2;
echo "You selected $N issues(s) in your computer: ";
for($i=1; $i < $N; $i++)
{
include "path/to/tutorials/problem_{$i}.html";
}
}
?>
- <?php
- $pro = $_POST['problem'];
- if(empty($pro))
- {
- echo "You got this error because you didn't select any issue.<br />
- Please, click the back bottom and recheck your issues."
- }
- else
- {
- $N = count($pro) + 2;
- echo "You selected $N issues(s) in your computer: ";
- for($i=1; $i < $N; $i++)
- {
- include "path/to/tutorials/problem_{$i}.html";
- }
- }
- ?>
Remember that in this way, you are including the contents of one page inside of another page, so in the problem_1.html through problem_10.html all you put in there is the tutorial... the body. No <html><head><body> tags or anything like that.
I'm also not sure if this is suitable to your needs.
(I'm also not 100% sure about the PHP... it should work, but if it brings up errors... well, post it here if you can't fix them).
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
- BomWatchout
- Newbie


- Joined: Sep 20, 2010
- Posts: 12
- Status: Offline
well, is not really that many tutorials i have to make because I also plan on finding a way to send an error if certain boxes combinations are checked. You see, the list of 10 I have is not really all the reported problems.
I will tell you the complete story, that way we will be in the same page.
I host a forum of YuGiOh. The game you can download for free and play online also for free. There are drawbacks with the game though, bad things. One of them is that the game won't save until some registry problems are solved. There are also ways to get all the game cards using some tutorials i made, but there are problems with that too, problems like: if you do it wrong you might end up getting black screen or game not opening at all.
Back in my forum I have alot of resources for the game, like modifications and stuff and that is one of the reasons why people keep coming, that and to look for answers to those problems i mentioned. The list I want to make will just INFORM me of their current situation, based on that, I will grant them with a tutorial that fits their situation. Here is the complete list I want to post:
As you can see, some of them cannot be together, so in the end, it will not be 100 tutorials
I will tell you the complete story, that way we will be in the same page.
I host a forum of YuGiOh. The game you can download for free and play online also for free. There are drawbacks with the game though, bad things. One of them is that the game won't save until some registry problems are solved. There are also ways to get all the game cards using some tutorials i made, but there are problems with that too, problems like: if you do it wrong you might end up getting black screen or game not opening at all.
Back in my forum I have alot of resources for the game, like modifications and stuff and that is one of the reasons why people keep coming, that and to look for answers to those problems i mentioned. The list I want to make will just INFORM me of their current situation, based on that, I will grant them with a tutorial that fits their situation. Here is the complete list I want to post:
Code: [ Select ]
<form action="checkbox-form.php" method="post">
Please, check all the boxes that applies to your current sitiation:<br /><br />
<input type="checkbox" name="problem[]" value="A" />I am using a 32-bit computer.<br />
<input type="checkbox" name="problem[]" value="B" />I am using Windows 7 / vista.<br />
<input type="checkbox" name="problem[]" value="C" />I am using Windows XP.<br />
<input type="checkbox" name="problem[]" value="D" />I used BomWatchOut's installer but i still do not have all cards.<br />
<input type="checkbox" name="problem[]" value="E" />I have the game.<br />
<input type="checkbox" name="problem[]" value="F" />I do not have the game.<br />
<input type="checkbox" name="problem[]" value="G" />*I am not sure if i have only one Yu-Gi-Oh! game in my computer.*<br />
<input type="checkbox" name="problem[]" value="H" />I cannot save replays and/or decks.<br />
<input type="checkbox" name="problem[]" value="I" />I get a black screen and I cannot see anything.<br />
<input type="checkbox" name="problem[]" value="J" />I don't know where my "run" command is.<br />
<center><input type="submit" name="formSubmit" value="Submit" /></center><br /><br />
Please, pay special attention to the boxes with a *<br /> If your problem is not listed here then please let me know so.<br />
<b>If you check more boxes than the ones you have to, then you might end up getting nothing</b>
</form>
Please, check all the boxes that applies to your current sitiation:<br /><br />
<input type="checkbox" name="problem[]" value="A" />I am using a 32-bit computer.<br />
<input type="checkbox" name="problem[]" value="B" />I am using Windows 7 / vista.<br />
<input type="checkbox" name="problem[]" value="C" />I am using Windows XP.<br />
<input type="checkbox" name="problem[]" value="D" />I used BomWatchOut's installer but i still do not have all cards.<br />
<input type="checkbox" name="problem[]" value="E" />I have the game.<br />
<input type="checkbox" name="problem[]" value="F" />I do not have the game.<br />
<input type="checkbox" name="problem[]" value="G" />*I am not sure if i have only one Yu-Gi-Oh! game in my computer.*<br />
<input type="checkbox" name="problem[]" value="H" />I cannot save replays and/or decks.<br />
<input type="checkbox" name="problem[]" value="I" />I get a black screen and I cannot see anything.<br />
<input type="checkbox" name="problem[]" value="J" />I don't know where my "run" command is.<br />
<center><input type="submit" name="formSubmit" value="Submit" /></center><br /><br />
Please, pay special attention to the boxes with a *<br /> If your problem is not listed here then please let me know so.<br />
<b>If you check more boxes than the ones you have to, then you might end up getting nothing</b>
</form>
- <form action="checkbox-form.php" method="post">
- Please, check all the boxes that applies to your current sitiation:<br /><br />
- <input type="checkbox" name="problem[]" value="A" />I am using a 32-bit computer.<br />
- <input type="checkbox" name="problem[]" value="B" />I am using Windows 7 / vista.<br />
- <input type="checkbox" name="problem[]" value="C" />I am using Windows XP.<br />
- <input type="checkbox" name="problem[]" value="D" />I used BomWatchOut's installer but i still do not have all cards.<br />
- <input type="checkbox" name="problem[]" value="E" />I have the game.<br />
- <input type="checkbox" name="problem[]" value="F" />I do not have the game.<br />
- <input type="checkbox" name="problem[]" value="G" />*I am not sure if i have only one Yu-Gi-Oh! game in my computer.*<br />
- <input type="checkbox" name="problem[]" value="H" />I cannot save replays and/or decks.<br />
- <input type="checkbox" name="problem[]" value="I" />I get a black screen and I cannot see anything.<br />
- <input type="checkbox" name="problem[]" value="J" />I don't know where my "run" command is.<br />
- <center><input type="submit" name="formSubmit" value="Submit" /></center><br /><br />
- Please, pay special attention to the boxes with a *<br /> If your problem is not listed here then please let me know so.<br />
- <b>If you check more boxes than the ones you have to, then you might end up getting nothing</b>
- </form>
As you can see, some of them cannot be together, so in the end, it will not be 100 tutorials
- Bogey
- Bogey


- Joined: Jul 14, 2005
- Posts: 8212
- Loc: USA
- Status: Offline
- righteous_trespasser
- Scuffle


- Joined: Mar 12, 2007
- Posts: 6228
- Loc: South-Africa
- Status: Offline
I think you're approaching this from the wrong angle ... Instead of submitting the form and creating a link from the post values, rather just include the correct files ... So in other words, create solution_1.html to solution_10.html files and just include them if necessary ... like so:
form.html
checkbox-control.php
form.html
HTML Code: [ Select ]
<form action="checkbox-control.php" method="post">
Please, check all the boxes that applies to your current sitiation:<br /><br />
<input type="checkbox" name="problem[]" value="A" />Problem 1.<br />
<input type="checkbox" name="problem[]" value="B" />Problem 2.<br />
<input type="checkbox" name="problem[]" value="C" />Problem 3.<br />
<input type="checkbox" name="problem[]" value="D" />Problem 4.<br />
<input type="checkbox" name="problem[]" value="E" />Problem 5.<br />
<input type="checkbox" name="problem[]" value="F" />Problem 6.<br />
<input type="checkbox" name="problem[]" value="G" />Problem 7.<br />
<input type="checkbox" name="problem[]" value="H" />Problem 8.<br />
<input type="checkbox" name="problem[]" value="I" />Problem 9.<br />
<input type="checkbox" name="problem[]" value="J" />Problem 10.<br />
<center><input type="submit" name="formSubmit" value="Submit" /></center><br /><br />
<br /> If your problem is not listed here then please let me know so.<br />
</form>
Please, check all the boxes that applies to your current sitiation:<br /><br />
<input type="checkbox" name="problem[]" value="A" />Problem 1.<br />
<input type="checkbox" name="problem[]" value="B" />Problem 2.<br />
<input type="checkbox" name="problem[]" value="C" />Problem 3.<br />
<input type="checkbox" name="problem[]" value="D" />Problem 4.<br />
<input type="checkbox" name="problem[]" value="E" />Problem 5.<br />
<input type="checkbox" name="problem[]" value="F" />Problem 6.<br />
<input type="checkbox" name="problem[]" value="G" />Problem 7.<br />
<input type="checkbox" name="problem[]" value="H" />Problem 8.<br />
<input type="checkbox" name="problem[]" value="I" />Problem 9.<br />
<input type="checkbox" name="problem[]" value="J" />Problem 10.<br />
<center><input type="submit" name="formSubmit" value="Submit" /></center><br /><br />
<br /> If your problem is not listed here then please let me know so.<br />
</form>
- <form action="checkbox-control.php" method="post">
- Please, check all the boxes that applies to your current sitiation:<br /><br />
- <input type="checkbox" name="problem[]" value="A" />Problem 1.<br />
- <input type="checkbox" name="problem[]" value="B" />Problem 2.<br />
- <input type="checkbox" name="problem[]" value="C" />Problem 3.<br />
- <input type="checkbox" name="problem[]" value="D" />Problem 4.<br />
- <input type="checkbox" name="problem[]" value="E" />Problem 5.<br />
- <input type="checkbox" name="problem[]" value="F" />Problem 6.<br />
- <input type="checkbox" name="problem[]" value="G" />Problem 7.<br />
- <input type="checkbox" name="problem[]" value="H" />Problem 8.<br />
- <input type="checkbox" name="problem[]" value="I" />Problem 9.<br />
- <input type="checkbox" name="problem[]" value="J" />Problem 10.<br />
- <center><input type="submit" name="formSubmit" value="Submit" /></center><br /><br />
- <br /> If your problem is not listed here then please let me know so.<br />
- </form>
checkbox-control.php
PHP Code: [ Select ]
<?php
for($i=0;$i<11;$i++){
if(isset($_POST['problem'][$i]) && !empty($_POST['problem'][$i])){
include("includes/solution_$i.html");
}
}
?>
for($i=0;$i<11;$i++){
if(isset($_POST['problem'][$i]) && !empty($_POST['problem'][$i])){
include("includes/solution_$i.html");
}
}
?>
- <?php
- for($i=0;$i<11;$i++){
- if(isset($_POST['problem'][$i]) && !empty($_POST['problem'][$i])){
- include("includes/solution_$i.html");
- }
- }
- ?>
Let's leave all our *plum* where it is and go live in the jungle ...
- BomWatchout
- Newbie


- Joined: Sep 20, 2010
- Posts: 12
- Status: Offline
- Anonymous
- Bot


- Joined: 25 Feb 2008
- Posts: ?
- Loc: Ozzuland
- Status: Online
September 23rd, 2010, 12:18 am
1, 2
To Reply to this topic you need to LOGIN or REGISTER. It is free.
Post Information
- Total Posts in this topic: 22 posts
- Users browsing this forum: No registered users and 174 guests
- You cannot post new topics in this forum
- You cannot reply to topics in this forum
- You cannot edit your posts in this forum
- You cannot delete your posts in this forum
- You cannot post attachments in this forum
