Posted by Akhenaten on 05/20/07 20:54
On May 20, 3:23 pm, Philipp Grassl <p.gra...@gmx.at> wrote:
> You could do it like
>
> ---
> <?
>
> if (isset($_GET['q']) && $_GET['q']=='y')
> {
> mysql_query(...);
> header("Location: ?");
>
> }
>
> echo "<a href='?q=y'>Execute Query</a>";
>
> ?>
> ---
>
> However, using this technique all the GET-variables would be cleared.
> Also, I personally would use two PHP-Files, if you don't need to use the
> returned data from the query in the first script:
The problem is I do need the return data. I guess a good example would
be something similar to a voting poll. If you haven't voted then the
"vote" img will be displayed. Clicking on it will execute a mysql
update. The page will then refresh with the vote results in place of
the vote image.
[Back to original message]
|