Hi am new to programming, and I trying to show different PHP files using if statement, I want to show the finaloffline.php if I input the number 22 while I want to show the Delayed report if I input different number Here is my code. is this possible?
<h1>input Number</h1>
<?PHP
if ($myVariable == "22")
{
echo '<form method="post" action="Finaloffline.php">';
}
else
{
echo '<form method="post" action="DelayedReport.php">';
}
?>
<?php $myVariable = "";?>
<input type="text" name="text" value="<?php echo $myVariable; ?>">
<button type="submit">Submit</button>
</form>
Aucun commentaire:
Enregistrer un commentaire