pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: delayed passing of values in form
3+ messages / 3 participants
[nested] [flat]
* Re: delayed passing of values in form
@ 2003-03-18 12:00 ryanne cruz <ryanne.cruz@up.edu.ph>
0 siblings, 0 replies; 3+ messages in thread
From: ryanne cruz @ 2003-03-18 12:00 UTC (permalink / raw)
To: pgsql-php
hi list.
i have a script with a delayed passing of values in the form. for example, i
chose the year 2003 and ticked the radio button for households. when i look at
the link, the variables are not yet passed to the maindemoutputmap script. i
tried displaying the values of the variables and they came up correctly. if i
choose another year or radio button, what i'll see is the previous options
selected (the previous values assigned to the variables).
if my explanation is hard to understand, you colud go to this site to see what
i mean:
http://www.philenergydb.upd.edu.ph/maindemoutputmap.php?prid=1
i ahve also included part of the script:
echo "<form method=\"post\"
action=\"maindemoutputmap.php?prid=".$prid."&module=demand"."&year=".$year."&tag=".$tag."&table4=".$table4."&dtag=1\";>";
echo "<font size='2' face=\"Verdana\"><b>Choose energy source:
</b></font>";
echo "<tr><td align=center><select name=\"tag\">";
idcombomodel("esourceid", "esource", "energysource", $primarylink);
echo " </select></td></tr>";
echo "</td></tr>";
echo "<tr><td height=\"10\" valign=\"center\" align=\"center\">";
//echo "<form method=\"post\"
action=\"$root/maindemoutputmap.php?prid=".$prid."&module=demand"."&year=".$year."&tag=".$tag."&table4=".$table4."&dtag=1\";>";
echo "<font size='2' face=\"Verdana\"><b>Choose year of desired record:
</b></font>";
echo "</td></tr><tr><td align=center><select name=\"year\">";
populate_year($primarylink);
echo " </select>";
echo "</td></tr>";
echo "<tr><td align=\"center\" valign=\"center\" height=\"10\"><font
size=\"2\" face=\"Verdana\"><b>Summary for Year $year</b></font></td></tr>";
echo "<td height=\"10\" align=center><font size=\"2\"
face=\"Verdana\"><i>$esource</i></font></td>";
echo "<td height=20></td>";
echo "<tr><table>";
//echo "<form method=\"post\"
action=\"$root/maindemoutputmap.php?prid=".$prid."&module=demand"."&year=".$year."&tag=".$tag."&table4=".$table4."&dtag=1\";>";
//echo "<tr><td height=10></td></tr><tr><td align=\"center\"
height=\"15\"><font face=\"Arial, Helvetica, sans-serif\" color=\"#CD853F\"
size=\"2\">LAYERS</font></td></tr>";
echo "<tr><td height=\"10\" valign=\"center\" align=\"center\">";
echo "<tr><td width=65></td><td align=\"left\">
<font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"2\">No. of
households</font></td>
<td align=\"right\"><input type=\"radio\" name=\"table4\"
value=\"households\"></td><td width=40></td></tr>";
echo "<tr><td width=65></td><td align=\"left\">
<font face=\"Verdana, Arial, Helvetica, sans-serif\"
size=\"2\">Installations</font></td>
<td align=\"right\"><input type=\"radio\" name=\"table4\"
value=\"installs\"></td><td width=40></td></tr>";
echo "<tr><td width=65></td><td align=\"left\">
<font face=\"Verdana, Arial, Helvetica, sans-serif\"
size=\"2\">Consumption</font></td>
<td align=\"right\"><input type=\"radio\" name=\"table4\"
value=\"consumption\"></td></tr>";
echo "<td align=\"center\" colspan=\"100%\" width=\"50%\"><input
type=\"submit\" value=\"SUBMIT!\"> </td></tr></form>";
echo "<table align=center><tr><td height=10></td></tr><tr><td align=\"center\"
><font face=\"Arial, Helvetica, sans-serif\" color=\"#8B8A54\" size=\"2\"><a
href=\"maindemoutputmap.php?prid=".$prid."&dtag=2\";\">Industrial</a></font></td></tr>";
echo "<tr><td align=\"center\" ><font face=\"Arial, Helvetica,
sans-serif\" color=\"#8B8A54\" size=\"2\"><a
href=\"maindemoutputmap.php?prid=".$prid."&dtag=3\";\">Agricultural</a></font></td></tr>";
echo "<tr><td align=\"center\" ><font face=\"Arial, Helvetica,
sans-serif\" color=\"#8B8A54\" size=\"2\"><a
href=\"maindemoutputmap.php?prid=".$prid."&dtag=4\";\">Transportation</a></font></td></tr>";
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: delayed passing of values in form
@ 2003-03-18 13:39 Robert-Reinder Nederhoed <info@nederhoed.com>
2003-03-19 18:02 ` Re: delayed passing of values in form Vince Vielhaber <vev@michvhf.com>
0 siblings, 1 reply; 3+ messages in thread
From: Robert-Reinder Nederhoed @ 2003-03-18 13:39 UTC (permalink / raw)
To: pgsql-php
Hello Ryanne,
Is it a problem? What was the idea of posting?
My guess is you have sent the variables using POST and have also set a GET-querystring in the form target-url (named 'action'):
action=\"$root/maindemoutputmap.php?prid=".$prid
The default order of processing the query variables is GPC, being GET, POST and COOKIE.
So your GET querystring is overruled by the POSTed form-data.
If you would like other behaviour, stop passing the $prid in the form action field:
action=\"$root/maindemoutputmap.php\"
Greetings, Robert-Reinder (rr@sodutch.com)
http://rr.sodutch.com/
--
Een papegaai is geen olifant
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: delayed passing of values in form
2003-03-18 13:39 Re: delayed passing of values in form Robert-Reinder Nederhoed <info@nederhoed.com>
@ 2003-03-19 18:02 ` Vince Vielhaber <vev@michvhf.com>
0 siblings, 0 replies; 3+ messages in thread
From: Vince Vielhaber @ 2003-03-19 18:02 UTC (permalink / raw)
To: pgsql-php
On Tue, 18 Mar 2003, Robert-Reinder Nederhoed wrote:
> My guess is you have sent the variables using POST and have also set a GET-querystring in the form target-url (named 'action'):
>
> action=\"$root/maindemoutputmap.php?prid=".$prid
>
> The default order of processing the query variables is GPC, being GET, POST and COOKIE.
> So your GET querystring is overruled by the POSTed form-data.
>
> If you would like other behaviour, stop passing the $prid in the form action field:
>
> action=\"$root/maindemoutputmap.php\"
Or pass it as a command line argument:
action=\"$root/maindemoutputmap.php?".$prid."\"
and pick it up inside as $argv[0] (provided your config allows command
line args).
Vince.
--
Fast, inexpensive internet service 56k and beyond! http://www.pop4.net/
http://www.meanstreamradio.com http://www.unknown-artists.com
Internet radio: It's not file sharing, it's just radio.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2003-03-19 18:02 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-03-18 12:00 Re: delayed passing of values in form ryanne cruz <ryanne.cruz@up.edu.ph>
2003-03-18 13:39 Re: delayed passing of values in form Robert-Reinder Nederhoed <info@nederhoed.com>
2003-03-19 18:02 ` Vince Vielhaber <vev@michvhf.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox