PHP is a widely-used general-purpose scripting language that is especially suited for Web development. Questions about programming in PHP are off-topic and should be asked on Stack Overflow.
PHP is often paired with the MySQL relational database. PHP also includes great database support for PostgreSQL, SQLite, Microsoft SQL Server (API ref), Oracle, IBM DB2 & Cloudscape, Apache Derby and even ODBC. All modern versions of PHP include PDO, a built-in data-access abstraction library with comprehensive connectivity options.