Forum Moderators: coopster
Using an HTML FORM with hidden POST variable $Orig_Name
passing to the PHP script.
Single PHP SCRIPT:
Store variable with:- $New_Name = strtoupper($Orig_Name);
Use $New_Name as a trigger for various ops which are
then stored in further variables.
Use if / elseif for new form asking / checking for
name/email, using a print PHP / HTML Form :-
<FORM ACTION="'.$PHP_SELF.'" METHOD="POST">
To narrow down the issue I have temporarily put
a line of test variables on each HTML page :-
'."$variable1_2_test".'
'."$variable2_2_test".'
'."$variable3_2_test".' etc
ISSUE in PHP Script?:
All test variables appear on the PHP/HTML Form OK.
When clicking the Submit button on the PHP/HTML Form,
the variables selected with $Old/$New_Name disappear.
The POST variables name/email from the PHP/HTML
Form work fine, including my separately entered
default email address, entered as a variable at
the top of the script - appears through the script.
If I "hard code" $New_Name, the script works a treat.
Although I "store" the Original var to New var, once
Submit is hit in the PHP Form, $Orig_Name blanks and
$New_Name looses? its corresponding variable.
Is there a way to store $Orig_Name POSTed from the
original HTML form, and keep it in the PHP script,
no matter what - preferably without
JavaScript, files, cookies & database...
- as simple as possible : ) Many thanks, DonWayne
[edited by: donwayne at 1:30 pm (utc) on Nov. 8, 2003]