Greetings all.
Im still in the learning process but find it truly amazing so far. I am not at the database stage yet, so am just working with a large array for now.
I have a personal journal site and was wondering if anyone could help me with defining/writing/reading from global variables from a user clicking a button or a href. I have the following files
1)index.php - main page
2)base.php - include file containing one large array $ar_weight
// this $ar_weight( has 365 elements, each listing the current weight for that day)
3)weight.php
// This page displays the current weight entries for the past week.
// with a For statement just displaying $ar_weight[n-7] through $ar_weight[n]
// where n represents today.
My question is, I have a <div> with a righ column that I would like to display archives of prior weeks activities. So after the user clicks a hrefs or an image, the current page would display that weeks activities. I'm thinking of just writing to a temporary global variable $tempvar that can capture the appropriate date value, so i can loop out the results with a For Statement with the $ar_weight array.
a. should i use get or post
b. how should i go about writing to the $temvar
Much appreciated, thanks for taking the time to read this.
Have a good day 🙂