Re: newbie with another HTML/navigation question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rod Clay wrote:
I have a php script that is invoked on 2 different occasions:

1) the first to create a page with a form the user will use to input information for a new table row - this form has method=POST

2) the script is run a second time to accept the input from the completed form, add the new row to the table on the database, then create a simple form with an "OK" button the user will click on to go to another page to view the result of the database maintenance - this form has method=GET

Everything is working great EXCEPT THAT the url parameter I attempt to pass on the second form to the php script that displays the database maintenance never gets there! It's on the second form (<form method="get" action="bloglist.php?thread=yet%20another%20new%20thread">) but the bloglist.php script doesn't receive it. The query string is empty when bloglist.php starts.

Also, another very curious, and perhaps revealing, thing - when I attempt to view the page source of the second form I mention above, the one with method=GET, I get the odd, and absolutely nonsensical, message "The page you are trying to view contains POSTDATA that has expired from the cache." But this makes no sense, since this second page (with method=GET) has (or should have) no POSTDATA!?!

Can anyone make any sense of any of this for me? I'm making pretty good progress in general, but, once again, I seem to have hit a snag here I'm don't seem to be able to get past.

Thanks for any help you can give me.

Rod
clay.1@xxxxxxx

Firstly, if you have a form and you are sending it using GET, then why don't you use a <input type='hidden' name='thread' value='yet another new thread' /> element to send the parameter - that's what input tags are for. I have a feeling that the "?foo=bar" bit is stripped off a GET request URL if there are other form elements, although it's not always stripped off a POST... maybe it's browser-dependent.

Secondly, when you refresh the second form, you are making a POST request - that's what generated the form in the first place, so you would expect the message about POSTDATA - and (in Firefox at least), to view the source the browser repeats the page request, effectively the same as refreshing the page. If you want to see the source without repeating the POST request, you need to use something like the WebDeveloper tool bar - it has a View Generated Source function which extracts the source from the DOM model the browser used to render the page.

--
Peter Ford                              phone: 01580 893333
Developer                               fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux