morning yangsuli,
as these guys have mentioned, you're going to have to submit your page
and have the PHP run it's function before displaying the same page
again.
i.e.
1. user clicks a link
<a href="<?php echo $this->params['url']['url']; ?>/argument"
title="click me">click here to perform function</a>
2. this sends the request to Cake at the server end where you can
process it in your controller. let's pretend your controller is users
and your action is view.
in your users_controllers.php file you would have this action:
function view($argument = null) {
if (!is_null($argument)) {
// perform your function
}
// do the rest of the processing required for this function
}
Does this make sense?
cheers,
mikee
On 05/11/06, Apprentice <[EMAIL PROTECTED]> wrote:
>
> There is nothing wrong with Cake... I can't see that your PHP code is
> correct.
>
> You can use Ajax to submit info to the PHP script when a user clicks on
> the link and then get the result from the script's response.
>
> If you want us to help please state clearly & in-detail your intention
> or attach the HTML & PHP file.
>
> Viet.
>
> On Nov 4, 2:39 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > i have tried to do this by using forms
> > action="<? php function(); header(location:$_server[request_url] ?>
> > but it didnot work out.....:(
> > parse error or something........
> >
> > what is cake action?
> > would you please explain it :)
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---