Jump to content
Larry Ullman's Book Forums

Answer to page 79, 4th Bullet


Recommended Posts

I have for the past twenty minute going back in to the chapter's pages and on this forum but I cannot find the answer to the question: "Why must an HTML page that contains a form that's being submitted to a PHP script be loaded through a URL?

I must move on: I cannot waste any further time trying to find this answer.

 

Thank You to whom does so answer this question for me.

Link to comment
Share on other sites

PHP scripts must be run through the web server application (e.g., Apache). To do that, the PHP script must be run through a URL. So if an HTML form posts to a PHP script, it must be run through a URL, too. Or, looking at it the other way, if you load an HTML page through the file system and then submit the form, the PHP script will be loaded through the file system and do nothing (but likely show the PHP code in the browser).

Link to comment
Share on other sites

Thank you Mr. Ullman for the quick and thorough reply. 

My mind was not at its best the night I posted.  Better tonight, but I still have it stuck in neutral that only $_GET goes through the URL.  

 

On page 54, the textbook provides: "The GET method sends all the gather data as part of the URL.  The POST method transmits the information invisibly."   There is no explicit "through the URL" verbiage that I can find.

After typing this reply to this forum: I can now see through the backdoor when the text provides how each URL would appear with GET and POST.  I could not put two and two together to deduce that POST is also sent through the URL.  Reading comprehension fail: could not see the forest for the trees.

--------------------------

It is certainly wonderful that the author of a textbook make himself available to those using his works!

Thanks again.

Edited by PHP_Developer_or_BUST
I inadvertently pressed an unknown button on my lap-top that sent the reply before I was finished typing it.
Link to comment
Share on other sites

 Share

×
×
  • Create New...