Thank you! I really appreciate the help!
I am getting a different error now, after I made the change suggested, I know it is something I did wrong, but I am not sure what! Here is the code as is stands, the error I am getting is
Parse error: parse error, unexpected $ in /hsphere/local/home/jdixon/pressakey.net/snakes/p2roll.php on line 44
(line 44 is the final line, so I presume I havenot finished something off properly)
<?php $GET[P1SQ]; ?>
<?php $GET[P2SQ]; ?>
<?php
$ran1 = Rand (1,6);
$square = $GET[P2SQ] + $ran1;
?>
<?php
function randomDriver() {
// taken from internet to get random text placing
$drivers = array(
0 => 'free',
1 => 'snake',
2 => 'ladder',
3 => 'question',
4 => 'question',
5 => 'question',
6 => 'question',
7 => 'question',
8 => 'question',
9 => 'ladder',
10 => 'ladder',
11 => 'snake',
12 => 'snake',
13 => 'free',
14 => 'free',
15 => 'free',
16 => 'free',
17 => 'question',
18 => 'question',
19 => 'question',
20 => 'question',
21 => 'snake',
22 => 'ladder',
23 => 'free',
24 => 'free');
srand ((double) microtime() * 1000000);
$random_number = rand(0,count($drivers)-1);
$driver = ($drivers[$random_number]);
return $driver;
// end extracted script
?>
<?
header("location: P2.php?ROLL=".$ran1."&P2SQ=".$square."&P1SQ=".$GET[P1SQ]."&TYPE=".$driver."");
?>
I looked into session variables, and I am still learning about them. This script is the bones of a chutes and ladders game I am working on for two people, and the variables change after every turn, a session variable is more of a static site wide variable yes?
Once again, thanks for your help!