Home

Freelance PHP Developer

Welcome to PHP MySQL Freelance Developer

freelance web developerMy name is Mark . I am a freelance PHP developer with a BSc Honours Degree and over 8 years, experienced in PHP & MySQL web programming, clean W3 compliant XHTML/HTML/CSS coding and Javascript/AJAX programming. I specialize in building custom database driven PHP cms websites and interactive web applications.

If you’re looking to hire a PHP programmer or need professional php help for your web project – contact me! My mission is to provide quality and affordable PHP coding services and PHP consultations online.

If you require help now call 079 9111 855 or email info@mydeveloper.co.za

Save by hiring a PHP Freelancer

freelance web developer As a freelance php developer, I can offer very flexible php pricing. You can hire me for small or big php project on hourly basis. While per project pricing is available too. Depending on project specifics, hourly or per project pricing will be offered. Let me suggest a solution and provide you with estimated amount of hours needed to complete your project. Or fixed price quote for clearly defined PHP project along with estimated time of arrival.

Website Development Services

PHP Website Development I use latest technologies such as PHP, MySQL, HTML, CSS, XML, Flash, JavaScript, AJAX, CMS, open source. With over 9 years of web development experience and industry expertise, I know all the technologies, tools, tips and tricks to help you build a superior internet presence. Hire me to build your website and I will take care of all the technical aspects, including programming, setup and recommending hosting for your web site.I build clean, organized, functional, and search engine optimized websites from scratch. I focus on user friendly backend interface (based on PHP based CMS what I programmed), providing intuitive easy-to-use control panel for website owners or management staff. Powered with WYSIWYG editor, my PHP CMS will allow you to easily update content of your website without necessity to learn HTML or CSS and keep it up to date.

My PHP freelance services include:

* Interactive websites and browser based PHP applications development
* Custom PHP programming in PHP and MySQL
* HTML/CSS and Javascript/AJAX coding
* Table based HTML email coding
* Content management systems – custom php cms
* Database driven PHP/MySQL applications
* Online product catalogs database (I can convert data from your existing website)
* E-commerce solutions: shopping cart, ordering, reservations, registration, etc.
* Online payment processing (PayPal integration, Authorize.net integration, etc.)
* Login systems and password protected areas
* Ongoing website maintenance and support
* Search engine optimization
* Programming consulting

If you require help now call 079 9111 855 or email info@mydeveloper.co.za

Website Maintenance and Support

programmer php All the PHP websites what I create, featured with CMS that give you ability easily update your website content. With integrated WYSIWYG editor, you don’t have to worry about knowing HTML! However, if you think your valuable time can be used more effectively – I can do all the updates to your website and keep it current, on regular basis. Employing my expertise will help you to maintain your web site, easily and effectively.

Pricing and Rates

I am a freelancer, an individual PHP developer and not a big web company. That’s why I can afford keep my php coding rates low and provide PHP/MySQL and XHTML/CSS/Javascript/AJAX coding services at a fraction of what other freelance php developers and web design companies charge.I can build you a CMS driven website from scratch, I can apply new design to your existing PHP website, I can update and improve your website for you, I can add e-commerce and variety of other functional modules to your website. I will take care of all the technical aspects of your website development, including coding, applying design template of your choice, choosing hosting plan, setting up your website, and submitting it to major search engines.

And I’ll do it fairly. I am available for hire as php programmer or php webmaster on hourly basis. You can hire me for just 1-2 hours small job, or big weeks-long project. If your project is clearly outlined and all the details are provided, I can give you a fixed per project price quote. And you will never pay more than you expected for your project.

Contact Details

My statusMark
BSc Honours in Computer Science
Software Architect / Developer
Mobile 079 9111 855

Email info@mydeveloper.co.za

Starting with PHP

What You Should Already Know

Before you continue you should have a basic understanding of the following:

  • HTML/XHTML
  • JavaScript

If you want to study these subjects first, find the tutorials on our Home page.
What is PHP?

  • PHP stands for PHP: Hypertext Preprocessor
  • PHP is a server-side scripting language, like ASP
  • PHP scripts are executed on the server
  • PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
  • PHP is an open source software
  • PHP is free to download and use

What is a PHP File?

  • PHP files can contain text, HTML tags and scripts
  • PHP files are returned to the browser as plain HTML
  • PHP files have a file extension of “.php”, “.php3″, or “.phtml”

What is MySQL?

  • MySQL is a database server
  • MySQL is ideal for both small and large applications
  • MySQL supports standard SQL
  • MySQL compiles on a number of platforms
  • MySQL is free to download and use

PHP + MySQL

  • PHP combined with MySQL are cross-platform (you can develop in Windows and serve on a Unix platform)

Why PHP?

  • PHP runs on different platforms (Windows, Linux, Unix, etc.)
  • PHP is compatible with almost all servers used today (Apache, IIS, etc.)
  • PHP is FREE to download from the official PHP resource: www.php.net
  • PHP is easy to learn and runs efficiently on the server side

Where to Start?

To get access to a web server with PHP support, you can:

  • Install Apache (or IIS) on your own server, install PHP, and MySQL
  • Or find a web hosting plan with PHP and MySQL support

PHP

PHP (“Hypertext Preprocessor”) is a widely-used Open Source general-purpose scripting language that is especially suited for Web applications and website development, and can be embedded into HTML. Most of its syntax draws upon C, Java, and Perl, being very easy to learn. The main goal of the PHP language is to allow web developers to write dynamically generated web pages quickly, but due to its powerful flexibility, you can do much more with it.

What distinguishes PHP from something like client-side JavaScript is that the code is executed on the server. If you were to have a script similar to the above on your server, the client would receive the results of running that script, with no way of determining what the underlying code may be. You can even configure your web server to process all your HTML files with PHP, and then there’s really no way that users can tell what you have up your sleeve.

The best things in using PHP are that it is extremely simple for a newcomer, but offers many advanced features for a professional programmer.

If you require  professional Freelance PHP coding , please do not hesitate to contact me on 079 9111 855 or email info@mydeveloper.co.za

PHP String Manipulation

PHP – Strings

In the last lesson, PHP Echo, we used strings a bit, but didn’t talk about them in depth. Throughout your PHP career you will be using strings a great deal, so it is important to have a basic understanding of PHP strings.

PHP – String Creation

Before you can use a string you have to create it! A string can be used directly in a function or it can be stored in a variable. Below we create the exact same string twice: first storing it into a variable and in the second case we send the string directly to echo.

PHP Code:

$my_string = "Tizag - Unlock your potential!";
echo "PHP - Unlock your potential!";
echo $my_string;

In the above example the first string will be stored into the variable $my_string, while the second string will be used in the echo and not be stored. Remember to save your strings into variables if you plan on using them more than once! Below is the output from our example code. They look identical just as we thought.

Display:

Tizag – Unlock your potential! Tizag – Unlock your potential!

PHP – String Creation Single Quotes

Thus far we have created strings using double-quotes, but it is just as correct to create a string using single-quotes, otherwise known as apostrophes.

PHP Code:

$my_string = 'Tizag - Unlock your potential!';
echo 'Tizag - Unlock your potential!';
echo $my_string;

If you want to use a single-quote within the string you have to escape the single-quote with a backslash \ . Like this: \’ !

PHP Code:

echo 'FreelancePHP - It\'s Neat!';

PHP – String Creation Double-Quotes

We have used double-quotes and will continue to use them as the primary method for forming strings. Double-quotes allow for many special escaped characters to be used that you cannot do with a single-quote string. Once again, a backslash is used to escape a character.

PHP Code:

$newline = "A newline is \n";
$return = "A carriage return is \r";
$tab = "A tab is \t";
$dollar = "A dollar sign is \$";
$doublequote = "A double-quote is \"";

Note: If you try to escape a character that doesn’t need to be, such as an apostrophe, then the backslash will show up when you output the string.

These escaped characters are not very useful for outputting to a web page because HTML ignore extra white space. A tab, newline, and carriage return are all examples of extra (ignorable) white space. However, when writing to a file that may be read by human eyes these escaped characters are a valuable tool!

PHP – String Creation Heredoc

The two methods above are the traditional way to create strings in most programming languages. PHP introduces a more robust string creation tool called heredoc that lets the programmer create multi-line strings without using quotations. However, creating a string using heredoc is more difficult and can lead to problems if you do not properly code your string! Here’s how to do it:

PHP Code:

$my_string = <<<TEST
PHPMySQL.co.za
Webmaster Tutorials
Unlock your potential!
TEST;

echo $my_string;

There are a few very important things to remember when using heredoc.

  • Use <<< and some identifier that you choose to begin the heredoc. In this example we chose TEST as our identifier.
  • Repeat the identifier followed by a semicolon to end the heredoc string creation. In this example that was TEST;
  • The closing sequence TEST; must occur on a line by itself and cannot be indented!

Another thing to note is that when you output this multi-line string to a web page, it will not span multiple lines because we did not have any <br /> tags contained inside our string! Here is the output made from the code above.

mysql_fetch_array

mysql_fetch_array: Why Use It?

Do you know what is returned when you used the mysql_query function to query a MySQL database? It isn’t something you can directly manipulate, that is for sure. Here is a sample SELECT query of a table we created in the MySQL Create Table lesson.

PHP and MySQL Code:

<?php
$result = mysql_query("SELECT * FROM example");
?>

The value that mysql_query returns and stores into $result is a special type of data, it is a MySQL Resource. Additional PHP functions are required to extract the data from this Resource.

A Row of Data

The mysql_fetch_array function takes a MySQL query resource as an argument ($result) and returns the first row of data returned by the mysql_query. Our table example basically looks like the table below.

example MySQL Table:

name age
Timmy Mellowman 23
Sandy Smith 21
Bobby Wallace 15

The first row of data in this table is “Timmy Mellowman” and “23″. When we fetch an array from our MySQL Resource $result it should have Timmy’s name and age in it.

Getting a Row of Data using mysql_fetch_array

mysql_fetch_array returns the first row in a MySQL Resource in the form of an associative array. The columns of the MySQL Result can be accessed by using the column names of the table. In our table example these are: name and age. Here is the code to print out the first MySQL Result row.

PHP and MySQL Code:

<?php
// Make a MySQL Connection
$query = "SELECT * FROM example"; 

$result = mysql_query($query) or die(mysql_error());

$row = mysql_fetch_array($result) or die(mysql_error());
echo $row['name']. " - ". $row['age'];
?>

Display:

Timmy Mellowman – 23

This is just what we expected would happen! Now, the cool thing about mysql_fetch_array is that you can use it again on the same MySQL Resource to return the second, third, fourth and so on rows. You can keep doing this until the MySQL Resource has reached the end (which would be three times in our example).

Sounds like an awfully repetitive task. It would be nice if we could get all our results from a MySQL Resource in an easy to do script.

Fetch Array While Loop

As we have said, the mysql_fetch_array function returns an associative array, but it also returns FALSE if there are no more rows to return! Using a PHP While Loop we can use this information to our advantage.

If we place the statement “$row = mysql_fetch_array()” as our while loop’s conditional statement we will accomplish two things:

  1. We will get a new row of MySQL information that we can print out each time the while loop checks its conditional statement.
  2. When there are no more rows the function will return FALSE causing the while loop to stop!

Now that we know what we need to do and how to go about doing it, the code pretty much writes itself, so let’s move on to the next lesson. Just kidding! Here is the code that will print out all the rows of our MySQL Resource.

PHP and MySQL Code:

<?php
// Make a MySQL Connection
$query = "SELECT * FROM example"; 

$result = mysql_query($query) or die(mysql_error());

while($row = mysql_fetch_array($result)){
	echo $row['name']. " - ". $row['age'];
	echo "<br />";
}
?>

Display:

Timmy Mellowman – 23
Sandy Smith – 21
Bobby Wallace – 15

Copyright © 2010 - Mark ( +27 79 9111 855 )