DelphiFAQ Home Search:
General :: Programming :: php
Find help with php (PHP: Hypertext Preprocessor), an open source, server-side, HTML embedded scripting language used to create dynamic Web pages.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

Getting started with php and mysql

You need a basic skeleton to access a mysql database with php? Take the piece from below and add what you need.

<?php
 
 $link = mysql_connect("localhost", "user_name", "password")
    or die("Could not connect : " . mysql_error());
 
 mysql_select_db("database_name") or die("Could not select database");
 
 $query = "INSERT into users (uname) VALUES ('John')";
 echo "$query<br>\n";
 mysql_query($query);
 
 
 $query = "SELECT u_name, u_pass FROM users";
 $result = mysql_query($query);
 
 /* Printing results in HTML */
 while ($row = mysql_fetch_row($result)) {
    echo "\"$row[0],$row[1]\",<br>";
 }
 
 ?>

Generated 16:02:03 on Oct 16, 2017