Posted by frizzle on 05/28/06 23:34
pepi...@gmail.com wrote:
> Hi. I have a question about PHP programming philosophy:
>
> Imagine a web of a shop with a table displaying the name of some
> products. There is a link "Buy" next to each product. I want that link
> to execute some PHP code, but I don't want the navigator to show
> another web.
>
> So imagine the file is product_list.php and the link is: <a
> href="add_product.php?code=...> Buy </a>. I want the code in
> add_product.php to be executed but I want the navigator to display the
> same page it is displaying at the moment (product_list.php or
> whatever).
>
> How can I do that?
>
> Thanks!
maybe execute the link, and then redirect them back to the current
page,
e.g. using header('Location: product_list.php') or create an
(invisible) frame, have the link targetted to that frame, and have the
file there execute the code. ...
Frizzle.
[Back to original message]
|