Understanding PHP: What is It & Why Do We Need It?

  • Context: PHP 
  • Thread starter Thread starter Dave Ritche
  • Start date Start date
  • Tags Tags
    Php
Click For Summary

Discussion Overview

The discussion revolves around the role and necessity of PHP in web development, particularly in relation to interactive websites and server-side processing. Participants explore its applications, including form processing and database integration, as well as its utility in non-interactive contexts.

Discussion Character

  • Exploratory, Technical explanation, Conceptual clarification

Main Points Raised

  • Some participants suggest that PHP is essential for interactive websites, while static sites may not require it.
  • Others highlight PHP's integration with SQL as beneficial for websites needing database processing.
  • One participant mentions using PHP for managing internal links and code inclusion, even on a non-interactive site.
  • Another participant explains that PHP facilitates form processing and user data management, particularly in systems with user roles and credentials.
  • There is a reference to the evolving request-response model in web services, indicating a shift towards RESTful approaches.

Areas of Agreement / Disagreement

Participants generally agree on PHP's importance for interactive websites, but there are differing views on its necessity for static sites and its broader applications.

Contextual Notes

Some assumptions about the nature of websites and the specific use cases for PHP are not fully explored, such as the extent of interactivity required and the definitions of static versus dynamic content.

Dave Ritche
Messages
70
Reaction score
6
I'm really stuck at knowing about PHP..
What will happen without using PHP on your website?
I know it's server side but why we need it?to process forms?how PF uses PHP?
 
Technology news on Phys.org
If you have a static website that just displays things there is no need for PHP. If you have an interactive web site, then PHP is one of many tools you can use for code creation.
 
  • Like
Likes   Reactions: Silicon Waffle
PHP also integrates well with SQL, so it's useful if your website requires some database processing.
 
  • Like
Likes   Reactions: Silicon Waffle
My site isn't interactive and doesn't use any databases, but I nevertheless use PHP. First, it let's me adjust internal links automatically so that they work properly both on the server on my home computer, and on my public web hosting provider. This let's me develop and test new pages completely on my home computer before uploading them and making them public. Second, I can use an "include file" to insert code that's the same on each page, so if I ever need to change that stuff, I don't have to edit every single page.

In practice the pages look mostly like ordinary HTML and CSS, with a little bit of PHP code sprinkled in.
 
  • Like
Likes   Reactions: Silicon Waffle
Dave Ritche said:
...
I know it's server side but why we need it?to process forms?how PF uses PHP?
As people explained, it is mostly for interactive web sites. For instance, on PF you will have users and their roles, all of which are defined and stored also their credentials in one or more databases; so your posts, your profiles, etc can be edited, remembered and available for search by the system and other users.
To process a form, your client will send a request that contains his intent to the server. PHP will help you to extract the sent data and process/store them for particular purpose depending on your design and make a response after everything is successfully done. Today such a request-response model is re-formed via use of RESTful web-services.
 
  • Like
Likes   Reactions: Dave Ritche and Samy_A

Similar threads

  • · Replies 21 ·
Replies
21
Views
6K
  • · Replies 187 ·
7
Replies
187
Views
11K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 7 ·
Replies
7
Views
7K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K