The first part.
A way to submit 6 numbers. One number being the power ball. This information would then have to be stored for later use.
The second part.
A way to search through the information submitted in the first part. You would type is the winning numbers and if would tell you which ones matched and which ones didn't. And if the power ball matched it would highlight it or something to make it stand out.
I need help learning to turn this into the program I have in mind.
I've already created, with a little help, the if else statement that is the brains behind this program.
CODE
<?php
/**
* @DiGennaroDesigns
* @copyright 2008
*/
$x = 20;
$a = 5;
$b = 20;
$c = 13;
$d = 9;
$e = 5;
$f = 32;
$my_name = "someguy";
if ( $a == $x ) {
echo "Congratulations you're a winner!<br />";
}
else {
echo "Sorry this number wasn't a winner. Buy another ticket and try again!<br />"; //false
}
if ( $b == $x ) {
echo "Congratulations you're a winner!<br />";
}
else {
echo "Sorry this number wasn't a winner. Buy another ticket and try again!<br />"; //false
}
if ( $c == $x ) {
echo "Congratulations you're a winner!<br />";
}
else {
echo "Sorry this number wasn't a winner. Buy another ticket and try again!<br />"; //false
}
if ( $d == $x ) {
echo "Congratulations you're a winner!<br />";
}
else {
echo "Sorry this number wasn't a winner. Buy another ticket and try again!<br />"; //false
}
if ( $e == $x ) {
echo "Congratulations you're a winner!<br />";
}
else {
echo "Sorry this number wasn't a winner. Buy another ticket and try again!<br />"; //false
}
if ( $f == $x ) {
echo "Congratulations you're a winner!<br />";
}
else {
echo "Sorry this number wasn't a winner. Buy another ticket and try again!<br />"; //false
}
?>
Thanks,
Kevin DiGennaro

