Jump to content

PHP + Buttons


Suchy

Recommended Posts

I am having trouble with a button. Here is what I have:

 

<form method="POST" action="<?=$_SERVER['PHP_SELF']?>" enctype="multipart/form-data">
<input name="info" id="info" type="submit"  value="Show info"  onClick="<?php $info = TRUE ?>" /> 
</form>


<?php 
$info = FALSE;
if ($info == TRUE ) { ?>
......
......
<?php } ?>

 

This in not working, so what is the proper way to add functionality to a button?

Link to comment
https://forums.phpfreaks.com/topic/52996-php-buttons/
Share on other sites

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.