Posted by BKDotCom on 12/24/06 21:23
thecoolone wrote:
> I am trying to call a function from "a href" inside the same page.
> this is the code:
> echo "<br><br><a href=\"isearch($query)\">More results from
It's not clear what you're wanting to do.
a) Do you want a link that executes/calls isearch?
b) Or, do you want the href link/value to contain the results of
isearch?
I'm thinking you want (a). If so, try something like this:
echo '<br><br><a
href="?action=search&query='.urlencode($query).'">More
results</A>';
then you'd need to add some code to your page likey so:
if ( isset($_GET['action']) && $_GET['action'] == 'search' )
{
if ( !empty($_GET['query']) )
isearch($_GET['query']);
}
Navigation:
[Reply to this message]
|