kworld Posted February 25, 2010 Share Posted February 25, 2010 <form id="form5" name="form5" method="post" action= <?php $display = deposit.php; ?> 'member.php'> <input type="submit" name="button5" id="button5" value="Cashout Isk" /> </form> <?php include_once '$display' ?> I'm trying to make it so if a button was pressed it would then change a value of a variable and refresh that same page which will then results in a different pannel being shown on the webpage without the need of going to another page if this makes sense. Any ideas what im doing wrong anyone? Link to comment https://forums.phpfreaks.com/topic/193294-help-please-action-forms-and-variables/ Share on other sites More sharing options...
teamatomic Posted February 25, 2010 Share Posted February 25, 2010 action= <?php $display = deposit.php; ?> maybe action="deposit.php" HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/193294-help-please-action-forms-and-variables/#findComment-1017811 Share on other sites More sharing options...
kworld Posted February 25, 2010 Author Share Posted February 25, 2010 action= <?php $display = deposit.php; ?> maybe action="deposit.php" HTH Teamatomic Thanks for the reply, i have tried this but all it does is redirect me to another page which displays a white screen. Im trying to change the value of one variable when different buttons are pressed, once the variable has been changed the page will then refresh resulting in no lengthy url address or a serperate page. The variable change will basically link a differnt form into a section of the table on the main site. Sorry if this sounds confusing i just cant get it to work for some reason Link to comment https://forums.phpfreaks.com/topic/193294-help-please-action-forms-and-variables/#findComment-1017814 Share on other sites More sharing options...
trq Posted February 25, 2010 Share Posted February 25, 2010 Do you really need the button? <form id="form5" name="form5" method="post" action="?display=deposit.php"> <input type="submit" name="button5" id="button5" value="Cashout Isk" /> </form> <?php if (isset($_POST['display'])) { include_once $_POST['display']); } ?> You'll really wont to make sure you validate the file your going to include or your asking for major security issues doing things this way. Link to comment https://forums.phpfreaks.com/topic/193294-help-please-action-forms-and-variables/#findComment-1017822 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.