alex57
12-22-2006, 12:33 AM
hello,
Is it possible to post a value to the current page and display it when the page reloads?. For example if I am on 'page1.php' and usign a form to post a variable to 'page1.php', would this be possible. Possible code below: Any other suggestions if this wouldn't work??
This is code for page1.php
<?php
echo $_POST['selection'];
?>
<form action="page1.php" method="post">
<select size=1 name="selection" onchange="this.form.submit();">
<option value="goalkeeper">Goalkeeper</option>
</select>
</form>
Is it possible to post a value to the current page and display it when the page reloads?. For example if I am on 'page1.php' and usign a form to post a variable to 'page1.php', would this be possible. Possible code below: Any other suggestions if this wouldn't work??
This is code for page1.php
<?php
echo $_POST['selection'];
?>
<form action="page1.php" method="post">
<select size=1 name="selection" onchange="this.form.submit();">
<option value="goalkeeper">Goalkeeper</option>
</select>
</form>