Maybe possibly im just stupid but can some one in depth explain php how to use it and what it is :-| :lol: :sad:

Dani AI

Generated

Building on the replies from , and , here is a short, practical path from “what is PHP” to actually running and learning it in a modern, safe way.

A minimal local setup can be XAMPP/MAMP/LAMP or a Docker container; PHP also includes a built‑in dev server (run php -S localhost:8000 on systems with recent PHP). A tiny script to confirm the runtime and configuration is:

<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');

phpinfo();
?>

Core learning stages: basic syntax (variables, arrays, control flow, functions), then forms/sessions and file I/O, then database access via PDO with prepared statements (avoid legacy mysql_* extensions). For passwords use password_hash/password_verify. When projects grow, use Composer for dependencies and consider a framework (Laravel/Symfony) to enforce structure and conventions. Helpful consolidated guidance is available at PHP: The Right Way. Composer info is at getcomposer.org.

Quick debugging and security notes: enable full error reporting during development but disable display_errors in production; use Xdebug for step debugging; log errors to files. Always validate and whitelist input, escape output with htmlspecialchars to prevent XSS, use CSRF tokens for state-changing forms, deploy over HTTPS, and keep secrets out of the webroot (use environment variables or a secure vault).

A compact first project—guestbook or TODO list storing entries with PDO (or SQLite)—covers forms, validation, sessions and DB access and exposes common pitfalls. The official manual is the reference; the links above give modern best practices and workflows that pair well with the earlier answers in this thread.

Recommended Answers

All 4 Replies

PHP is a programming language that runs on web servers. It is used primarily to dynamically create web pages. It can process the entries from a form and output them to a web page, it can also read and write to files and databases contained on the web server.

It's dynamic, meaning it changes websites based on certain events and data, which makes for a more interesting and more dynamic website, than a website that is written in pure HTML and so it completely static and never changes unless manually changed (which is done much less than updating a PHP website I can tell you that.)

PHP runs on the server rather than on the client's machine and then delivers the polished product (web code) to the client for viewing. Unlike Java which runs on your machine, PHP is done before anything hits your machine. I think the term is Server-Side, but I'm just throwing that phrase out there. I think it's like ASP or something. It's very useful, though if you want to keep stuff DYNAMIC. Also, as a language, it's pretty cool just the way it works.

Alcides.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.