Jump to content

1885

New Members
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

1885's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Wow. That was simple. It's been a few years since I've done some php. It's nice to be coding again. Thanks for the help. I'm sure I'll need a lot more! page 1 <?php session_start(); $inputs = array(); $v = array(); for($i=0; $i<13; $i++) {$v[$i] = 0; $inputs[$i] = 0; echo "v = $v[$i] "; } $_SESSION['inputs'] = $inputs; $_SESSION['v'] = $v; ?> <html> page 2 <?php session_start(); $inputs = $_SESSION['inputs']; $v = $_SESSION['v']; for($i = 0; $i < 13; $i++) echo "$v[$i] -"; for($i = 0; $i < 13; $i++) echo "$inputs[$i] -"; ?> <html>
  2. I am having trouble passing an array from one page to another. I want to do a data submission check and set the intial values to 0. //********************************************************************************************************** page 1: <?php session_start(); $inputs = array(); $v = array(); for($i=0; $i<13; $i++) {$v[$i] = 0; $inputs[$i] = 0; //set inputs to 0 echo "v = $v[$i] "; // debug } $_SESSION['inputs'] = '$inputs'; ?> <html> </html> //********************************************************************************************************** page 2: <?php session_start(); $inputs = $_SESSION['inputs']; //for($i = 0; $i < 13; $i++) echo "$v[$i] -"; for($i = 0; $i < 13; $i++) echo "$inputs[$i] -"; //debug ?> <html> Input 0 <FORM method="post" action="check-inputs.php"> . . .
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.