Hello Community,
I was wondering if there is a way for a string ($string) to be remembered on a form submission?
Example:
<?php
$f = "";
$tS = "";
if (isset($_POST['tSubmit1'])) {
if (!empty($_POST['tString1'])) {
$tS = $_POST['tString1'];
$f = "f2";
}
}
if (isset($_POST['tSubmit2'])) {
if (!empty($_POST['tString2'])) {
if ($_POST['tString2'] === "pass") {
$f = "f3";
}
}
}
?>
<?php if ($f === "") { ?>
<form action="index.php" method="POST">
<input type="text" name="tString1"/>
<input type="submit" name="tSubmit1"/>
</form>
<?php } else if ($f === "f2") { ?>
<form action="index.php" method="POST">
<input type="text" name="tString2"/>
<input type="submit" name="tSubmit2"/>
</form>
<?php } else if ($f === "f3") {
echo Submit($_POST['fString1']);
} ?>
I need to know if there is a way for $f and $tS to be remembered after every submisssion with out having to use a session or cookies.
Please Help...