You are here: Daniel Dumas »

September, 2008

PHP and MySQL Basics: Comments

For greater readability of your PHP code, you should add comments to it, so that you or other people who will look at the code later will understand it clearly.

To do this refer to the example below..

PHP Single Line Comment: Keep Reading…

PHP and MySQL Basics: Your First PHP Script

Now that you know the basic syntax of PHP, let me congratulate you, congrats! hehe. . You are now ready to learn your very first PHP script.

consider this example on embedding your first PHP script into HTML.

<html>
<head>
<title>Hello World!</title>
</head>
<body>
<!-- This is how you print output in PHP-->

<h2><?php echo "Philippines is a beautiful country!"; ?></h2>

</body>
</html>

copy and save this to your text editor with a .php extension then run it on your localhost.. Keep Reading…

PHP and MySQL Basics: Syntax

PHP syntax is very simple it has 3 main parts, the first part is the php opening tag which is <?php, after that is your PHP CODE then the last part is the php closing tag which is ?>

it looks like this..

<?php
. . . . . . . . . . . . . . . . . . . . . .
YOUR PHP CODE HERE
. . . . . . . . . . . . . . . . . . . . . .
?>

you can also use the PHP Short open tags:

<? ?>
<?= ?>

but this is considered a bad habit.. you can use this tags but be sure that short open tag is set to on in your PHP.INI file.

Keep Reading…

PHP and MySQL Basics: Software Needed

Now that you have a little background about PHP, let’s now talk about the tools/software that you need in this lesson.

WHAT DO YOU NEED…

  1. A Web Server - Apache / IIS will work too..
  2. PHP - so that our web server can understand our php file.
  3. Database - MySQL
  4. Text Editor - Notepad, Dreamweaver, PHP Designer or any text editor that you want..
  5. Web Browser - you can use any broswer of your choice(Firefox, IE, SAFARI, OPERA, Chrome)..
  6. Operating System - Linux, Windows or Mac OS.

Keep Reading…

PHP and MySQL Basics: Introduction

Hello this is the first part of the PHP and MySQL basic tutorial here in my blog. if you have any questions or other concerns feel free to leave a comment or contact me through my contact page. okey before we go deep in learning the PHP langauge. lets first define what php is..

Keep Reading…

PHP and MySQL Basics Tutorial

PHP Basics

Hello guys today i am going to start my basic PHP tutorial. i will give examples in every part of this tutorial so that you can follow with me easily. my aim in this tutorial is to share my knowledge in PHP to anyone specially to my blog readers who wants to learn the basics of PHP. i will focus on the very basic of PHP so that anyone can follow along even if you dont have any background in PHP or any other programming language Keep Reading…

Separating CSS Style sheet for Different Browsers using PHP

Hi everyone today im going to start my tips / tutorials in web development, and i will focus today on separating a stylesheet for different browsers. if you read my last post i talked about separating my blog style sheet using php because IE6(Internet Explorer 6.0) handled my layout differently than version 7.0 and other browser like Firefox, Opera, Safari and Google Chrome. actually the only problem that i encountered with IE6 is its incompatibility to render transparent .PNG images and some spacing issues, the Keep Reading…

Just downloaded Opera 9.52 and Google Chrome

I just downloaded 2 new browser to my system it’s the Google’s new browser Chrome though it’s still in beta version and Opera 9.52 whoo i like the UI of this browser i just set it as my default browser, and in addition to its UI it’s also fast in loading site: ) i like google’s chrome too its simple and also fast. anyway this two Keep Reading…