Jump to content

calling php function with a button


karontte

Recommended Posts

so you wan't to execute that code when someone presses a button?

 

<?php

if (isset($_POST["mybutton"])) {
    require('inc_rate.php');
    getComments("1");
    submitComments("1",$PHP_SELF);
}

?>

<form action="" method="post" enctype="application/x-www-urlencoded">
    <input type="submit" name="mybutton" value="press" />
</form>

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.