You are here: Re: calling a php function « PHP Programming Language « IT news, forums, messages
Re: calling a php function

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&amp;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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация