Tuesday 16th September 2014 Login | Register
Plusnet

Andrew B

Contributing Authors : Bob Pullen

This entry was posted by Andrew B on Tuesday, March 23rd, 2010 at 4:59 pm and is tagged with , , and is posted in the category Website Design. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


2 comments on "A Beginners Guide to PHP"

oldvig

In example 2 there are 3 separate code errors.
Fixed version follows ...

<?php
$db_host="host_name_here";
$username="userid_here";
$password="your_password_here";
$DB_name="your_dbname_here";
echo "<html><body>";
$chan = mysql_connect($db_host,$username,$password);
mysql_select_db($DB_name,$chan);
$resultid=mysql_query("select * from test",$chan);
while ($resultrow = mysql_fetch_row($resultid)) {
while (list($key,$value) = each($resultrow)) {
echo "$value";
}
echo "<br />";
}
echo "</body></html>";
?>

spraxyt

Thanks. I've corrected that example, and added a missing > in Example 3.

Add a Comment

You must be logged in to post a comment.


Main Menu

Recently Viewed

Plusnet

Force9

Metronet

Free-Online

Madasafish

PAYH

Just The Name

Related Sites

Community Apps

Here at Plusnet we're always trying to use clever open source things to make our lives easier. Sometimes we write our own and make other people's lives easier too!

View the Plusnet Open Source applications page

About Plusnet

We're a Yorkshire-based provider selling broadband and phone services to homes and businesses throughout the UK. Winner of the ISPA 2010 'Best Consumer Customer Service ISP' Award, we're proud to offer the UK's best value standalone broadband.

© Plusnet plc All Rights Reserved. E&OE

Support Library is powered by WordPress

Add to Technorati Favourites