carrying form variables through to script 3

This is my first stab at PHP although I do have a history of programming going way back to my college years (in the 80s) so I guess I’ll be able to pick things ok.

I run a martials arts club and am looking at moving to MySQL and PHP as a better solution to take attendance than the spreadsheet that I’m currently using.

Unfortunately I’m getting stuck at the first hurdle, hoping someone can help…

The scripts that I have in mind are:
1.dateSelector.php
2.attendance.php
3.SummaryOfAttendance.php

I want the variable $class_date to be carried from script1 through script2 (which works fine) then both values from script2 sent to script3 - this is where I’m getting stuck.

in more detail:

  1. DateSelector.php
    input class date $classDate
    send $classDate to MemberAttendance.php

  2. MemberAttendance.php
    input member’s name $memberName
    Send $classDate and $memberName to 3.SummaryOfAttendance.php

Keep looping MemberAttendance.php for each person.

I imagine it shouldn’t be too complicated but I’ve tried so many different things over the last few days that it’s pretty clear I need some experienced help.

My Scripts

DateSelector.php
[php]

Class Date: [/php]

MemberAttendance.php
[php]

Class Date: <?php echo $_GET["classDate"]; ?>

Members Name:
// ** How do I also send $classDate along with the form??
[/php]

SummaryOfAttendance.php
[php]

Member Name: <?php echo $_GET["memberName"]; ?>
Class Date: <?php echo $_GET["classDate"]; ?>

Click here to enter another student
or here to go some other place
[/php]

Hi there,

Try to add a hidden input type in your MemberAttendance.php and give it $_GET[“classDate”] as the value.

[php]

Class Date: <?php echo $_GET["classDate"]; ?>

Members Name:
// ** How do I also send $classDate along with the form??
[/php]

Another way is to make use of session

Sponsor our Newsletter | Privacy Policy | Terms of Service