Jump to content

Help please: Action Forms and variables


kworld

Recommended Posts


<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

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.