|
Posted by Jerry Stuckle on 05/21/07 01:35
Akhenaten wrote:
> 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.
>
There are several ways you can do it. For instance, you can store the
$_GET variables in $_SESSION. You can add the variables when building
your "vote" link. You can put them as hidden fields in a form that is
submitted when they click on the link...
All kinds of things you can do. Which way is best is for you to decide.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|