Jump to content

Archived

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

Guest Tim London

Functions

Recommended Posts

Guest Tim London
Hi Guys,

If I have a web page called frogs.php and I define a function as:

<?php
function frog() {
echo "hello frogs!!";
}

I know that I can use <? echo frog(); ?> within the html part of the page to run the function but can I somehow bind that to a button or a link so that a user can run the function by clicking on a button or a link?

Share this post


Link to post
Share on other sites
Only with JS/Ajax, unless you move to a new page (because the data needs to be sent to the server with php).

Orio.

Share this post


Link to post
Share on other sites

×

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.