Kevin,
I've tried to strip this down to a managable amount. The original stuff is 3 .php files with over 3000 lines of php and html. Below, is what I believe, the pertinent coding.
I start with index.php, which is just an account name - password form which posts to login.php which checks the validity.
In login.php I start a session to capture the account name and further down I also capture district name:
<?session_start();
session_register('account');
session_register('district_name');
It's tested and either returns to resubmit the account/password or forwards to order_form.php by:
header ("Location: [url]http://domain_name/orders/order_form.php[/url]");
exit;
no problem so far. The session variables are passed successfully to order_form.php.
In order_form.php (it's a pretty straight-forward form - mostly html with a few php lines to swap out information based on district_name) I post the information to order.php:
<input onclick="this.value='Thanks'" type="submit" value="Send This Information" name="Submit">
Still no problem everything's working just fine.
Okay, we're in order.php, now there's a bunch of calculations on a dozen groups of entries that are tested for completeness. If it doesn't meet the requirements:
} elseif ($quality_amount[1] == 'No Order'){
$error_quality = 'No Order On This Product';
}elseif ($quality_order_amount < 100) {
$error_flag= 1;
$error_quality = 'Minimum Order Is 100 - You Ordered ' .$quality_order_amount;
}
it triggers error_flag=1 and, eventually starts the error routine which lists the mistakes and includes a button to send you back to order_form.php:
<input type=button value="Click Here To Go Back To Order Form" onClick="history.go(-1)">
Using either this onClick action or the browser back button results in an empty form (order_form.php).
Originally, the form was populated (when going back) but, sometime after adding the login routines and using the session variables, it quit populating the form.
I tried using the suggestions from the forum:
<input type="text" name="mn2_order" value="<? print $_REQUEST['mn2_order']; ?>"> It didn't work.
I tried session_register('mn_amount') in the session variables and set an array such as:
$mn_amount= array(
1=>$mn_order_8straw,
2=>$mn_order_10straw,
3=>$mn2_order);
and used in the form
<input type="text" name="mn2_order" value="<? print $mn_order[1]?>">
and used echo instead of print, too. No dice.
That is really the essence of the programs. There's a lot more coding but this seems to be the code that matters. If you need more info just let me know.
Thanks
Sam