HTML button call php function
Moderator: General Moderators
HTML button call php function
How can I make a button in html call a php function. I know in javascript you can do the Onclick method, can this be done with php as well?
maybe you can use this:
Code: Select all
<input type="Submit" value"function" name="call">
<?php
if(IsSet($Submit))
{
function();
}
?>of
Maybe?
Code: Select all
if($call){
//Create Function
myfunction(){
function commands
}
//Call Function
myfunction();
}Thanks guys these work, now i just need to debug my sql query 
EDIT: I take that back, neither of these are working. Tried them both and they did not run the function. Any more ideas? Trying to run a function that will execute a SQL query.
Also why I am on it, how does php do a redirect or reload of a page.
EDIT: I take that back, neither of these are working. Tried them both and they did not run the function. Any more ideas? Trying to run a function that will execute a SQL query.
Also why I am on it, how does php do a redirect or reload of a page.