Taking a break from the Card Display page. Now I can't get my lotto game to play. 3;
Here's my error:
PHP Code:
Parse error: syntax error, unexpected '=', expecting '}' in /home/enddayne/public_html/crystalhollow.com/games_lotto.php on line 59
And my code:
PHP Code:
<?php
include('inc/functions.php');
include('inc/bbcode.php');
include('games/rewards.php');
//***************//
// START SCRIPT //
//***************//
// Games Page
// Freebies
$article_title = "Whysper's Guild of Magic<span>Numerology Report</span>";
$article_content = "
<!--script-->
<script>
function process(){
var checkednums=0;
var x=0;
for(i=0; i<15; i++) {
if(document.lottery_ticket.number[i].checked==true){
x=x+1;
if(document.lottery_ticket.number[i].value=='1'){
checkednums=checkednums+1;
} //end if right and less than limit
} // end search checked
} // end for
if(x!=4){alert('You have chosen " + x + " numbers. Please select 4.');}
else{
if(checkednums==0){alert('Sorry, you didn't get any of the numbers.');}
if(checkednums==1){alert('You got 1 number correct, take any two cards you'd like.');}
if(checkednums==2){alert('You got 2 numbers correct, take any three cards you'd like.');}
if(checkednums==3){alert('You got 3 numbers correct, take any four cards you'd like.');}
if(checkednums==4){alert('You got 4 numbers correct, take all five cards and the choice coupon!');}
} // end else
} // end function
</script>
<!--lotto update code-->
<?php
$min='1';
$max='15';
$numbers = range($min, $max);
shuffle($numbers);
$random_1 = $numbers[0]; // first random number
$random_2 = $numbers[1]; // next random, non repeating
$random_3 = $numbers[2]; // next random, non repeating
$random_4 = $numbers[3]; // next random, non repeating
if ($random_1=='1' || $random_2=='1' || $random_3=='1' || $random_4=='1'){
$v1='1'; }
else {$v1='0'; }
if($random_1=='2' || $random_2=='2' || $random_3=='2' || $random_4=='2'){
$v2='1';}
else {$v2='0'; }
if($random_1=='3' || $random_2=='3' || $random_3=='3' || $random_4=='3'){
$v3='1';}
else {$v3='0'; }
if($random_1=='4' || $random_2=='4' || $random_3=='4' || $random_4=='4'){
$v4='1';}
else {$v4='0'; }
if($random_1=='5' || $random_2=='5' || $random_3=='5' || $random_4=='5'){
$v5='1';}
else {$v5='0'; }
if($random_1=='6' || $random_2=='6' || $random_3=='6' || $random_4=='6'){
$v6='1';}
else {$v6='0'; }
if($random_1=='7' || $random_2=='7' || $random_3=='7' || $random_4=='7'){
$v7='1';}
else {$v7='0'; }
if($random_1=='8' || $random_2=='8' || $random_3=='8' || $random_4=='8'){
$v8='1';}
else {$v8='0'; }
if($random_1=='9' || $random_2=='9' || $random_3=='9' || $random_4=='9'){
$v9='1';}
else {$v9='0'; }
if ($random_1=='10' || $random_2=='10' || $random_3=='10' || $random_4=='10'){
$v10='1'; }
else {$v10='0'; }
if ($random_1=='11' || $random_2=='11' || $random_3=='11' || $random_4=='11'){
$v11='1'; }
else {$v11='0'; }
if ($random_1=='12' || $random_2=='12' || $random_3=='12' || $random_4=='12'){
$v12='1'; }
else {$v12='0'; }
if ($random_1=='13' || $random_2=='13' || $random_3=='13' || $random_4=='13'){
$v13='1'; }
else {$v13='0'; }
if ($random_1=='14' || $random_2=='14' || $random_3=='14' || $random_4=='14'){
$v14='1'; }
else {$v14='0'; }
if ($random_1=='15' || $random_2=='15' || $random_3=='15' || $random_4=='15'){
$v15='1'; }
else {$v15='0'; }
?>
<!--lotto table with values-->
<form name="lottery_ticket" action="javascript:process()">
<table>
<tr>
<td><input type="checkbox" name="number" value="<?php echo "$v1"; ?>">1</td>
<td><input type="checkbox" name="number" value="<?php echo "$v2"; ?>">2</td>
<td><input type="checkbox" name="number" value="<?php echo "$v3"; ?>">3</td>
<td><input type="checkbox" name="number" value="<?php echo "$v4"; ?>">4</td>
<td><input type="checkbox" name="number" value="<?php echo "$v5"; ?>">5</td>
</tr>
<tr>
<td><input type="checkbox" name="number" value="<?php echo "$v6"; ?>">6</td>
<td><input type="checkbox" name="number" value="<?php echo "$v7"; ?>">7</td>
<td><input type="checkbox" name="number" value="<?php echo "$v8"; ?>">8</td>
<td><input type="checkbox" name="number" value="<?php echo "$v9"; ?>">9</td>
<td><input type="checkbox" name="number" value="<?php echo "$v10"; ?>">10</td>
</tr>
<tr>
<td><input type="checkbox" name="number" value="<?php echo "$v11"; ?>">11</td>
<td><input type="checkbox" name="number" value="<?php echo "$v12"; ?>">12</td>
<td><input type="checkbox" name="number" value="<?php echo "$v13"; ?>">13</td>
<td><input type="checkbox" name="number" value="<?php echo "$v14"; ?>">14</td>
<td><input type="checkbox" name="number" value="<?php echo "$v15"; ?>">15</td>
</tr>
<tr>
<td colspan=5 align=center>
<input type="submit" value="Check My Calculations!">
</td>
</tr>
<tr><td>
<p>Please save cards to your trade post according to how many you got correct!</p>
<center><img src=" . $regular[array_rand($regular,1)] . $digits[array_rand($digits,1)] . "><img src=" . $regular[array_rand($regular,1)] . $digits[array_rand($digits,1)] . "><img src=" . $regular[array_rand($regular,1)] . $digits[array_rand($digits,1)] . "><img src=" . $regular[array_rand($regular,1)] . $digits[array_rand($digits,1)] . "><img src=" . $regular[array_rand($regular,1)] . $digits[array_rand($digits,1)] . "><img src='media/coupon.png'>
</table>
</p>
</form>
";
//***************//
// OUTPUT PAGE //
//***************//
echo showpage($article_title, $article_content, $date);
?>
(Also attached)
What is going wrong with this? I may just scrap it if I can't get help (this and card pages).