This is a discussion on "The php, asp, html conundrum" within the PHP Forum section. This forum, and the thread "The php, asp, html conundrum are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
The php, asp, html conundrum
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
As I understand things, it goes as follows:
1. Web pages can be written in the usual html (or varaiations of, i.e. xtml), or in asp, or in php; all of which are scripting languages. 2. However, the usual html is not siutable for being able to produce scripts that will process things like form-data (in a html form-page), hence the need for php or asp scripts (usually held on the hosts server) and a reference code/tag on the html form page. Correct me if I'm wrong here... Seeing as asp or php can be used for both creating/editing web pages and for writing processing-scripts (which presumably can process form-data in asp/php pages, as well as html one's), why are popular web editors still oriented towards html? Why do we still have html at all..? |
|
|
|
|||
|
Re: The php, asp, html conundrum
Nope, you have it wrong.
HTML is not a scripting language, its a markup language. Which means its used to "decorate" text effect layout etc. PHP and ASP are serverside scripting languages, that process the page before it is sent to the browser/client. Normaly their output is an html page that can be displayed by a web browser, but they can also produce plain text, emails, images, flash, etc, or nothing at all. |
|
|||
|
Re: The php, asp, html conundrum
Right - many thanks for that. I see where I was going wrong.
I know, at risk of a contradiction here, that 'ML' stands for Markup Language, only I heard somewhere that you could embed PHP code into a HTML document which is what confused me a bit - don't know if this is possible? Anyway - so scripting languages like ASP/PHP usually process html pages before they are sent to the browser, then? I'm still confused a bit here - wouldn't a server side script generally only be required for processing form data in which case the page would be processed after it has been sent to the browser? That is, a visitor submits a html form page that calls a processing script as specified in the form action (?). No contradiction here, but... |
|
|||
|
Re: The php, asp, html conundrum
Quote:
They dont process the html pages they just process/parse the server side parts of the pages where html or asp applies. The browser process's the html part. user > server > browser > user Hope you get the idea. |
|
|||
|
Re: The php, asp, html conundrum
Many thanks...
I understand, in a way. But I also don't understand. In the form's action-field (I use Dreamweaver) would I not specify the script (for my purposes, a script that will process form-data) to be called? So, going by your answer which is clearing up a lot of things, does it matter whether the PHP script is embedded in the html form-page (also on the server in the first place), or if it resides as a standalone script on the server (php enabled); that is, not embedded? In which case, why are both options adopted? Also, if the PHP script is embedded in the html form-page, do I still have to specify this/the script in the form's action field? regards.. Last edited by a.jenery; Mar 2nd, 2006 at 10:59. |
|
|||
|
Re: The php, asp, html conundrum
Beginners usually seperate their php scripts on seperate files.
For example:
But once you learn more about php you can embed all you need into the form itself. Example:
Hope you understand :P |
![]() |
| Tags |
| php, asp, html, conundrum |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| @include() conundrum | CloudedVision | PHP Forum | 3 | Feb 15th, 2008 03:38 |
| Help with HTML | cewgirl | Web Page Design | 6 | Jun 7th, 2007 17:12 |
| Help With My Html | totally new | Web Page Design | 4 | May 15th, 2007 12:57 |
| Can I do this with html or anything else??? | Petey_ | Web Page Design | 2 | May 31st, 2006 21:04 |