Call PHP Functions with a HTTP request?
#3

Quote:
Originally Posted by Limex
View Post
PHP Code:
<?php
    
function f1() {
        ....
Something here
    
}
    
    function 
f2() {
        ... and 
something here
    
}
if( 
$_GET['func'] == )
{
function 
f1();
}
else if( 
$_GET['func'] == )
{
function 
f2();
}
?>
So for example, if php file was called samp.php

If you called samp.php?func=1 the first function would be called etc.
Ah thanks a lot! That's exactly what I've meant.
Reply


Messages In This Thread
Call PHP Functions with a HTTP request? - by Gomma - 17.09.2011, 18:07
Re: Call PHP Functions with a HTTP request? - by Limex - 17.09.2011, 18:10
AW: Re: Call PHP Functions with a HTTP request? - by Gomma - 17.09.2011, 18:13

Forum Jump:


Users browsing this thread: 1 Guest(s)