Welcome, Guest: Join Kenyans247 Log In!

Stats: 330 Members, 17,345 topics and 65 posts Date:  Wednesday 22 September 2021 at 02:49 PM
Popular & Trending NewestFeatured Links ClassifiedDirectoryLivescoresLive Kenyan TVLive Kenyan Radio Follow Us Like Us

About Us Terms & Conditions Privacy Policy FAQ's Disclaimer Copyright Contact Us Advertise With Us Download K247 APP Marketplace Moderator Policy We Are Hiring Kenya Radio and TV Stations Listen and Watch Live Letter From the C.E.O Kenya Radio Stations Live Kenya TV Stations Live Kenya - Newspapers and News Sites and popular blog Forum Rules

PHP Getting Started

Kenyans247 / Science/Technology / Webmasters / PHP Getting Started

1,545 people viewed

How To Prevent Your Car From Getting Stolen In Kenya Correct Score Betting Strategy Explained Emotional Vs Intelligent - Developing A Betting Strategy That Helps You Win 9 Alluring Photos Of Ex-kiambu Governor William Kabogo's Wife Setting Standards
Ad Read latest Kenyan News here Visit Site
(Go Down) (» Reply topic)
PHP Getting Started by Kenyans247(1): Mon 01, March, 2021 05:46pm
Getting Started with PHP
Here, you will learn how easy it is to create dynamic web pages using PHP. Before begin, be sure to have a code editor and some working knowledge of HTML and CSS.

If you're just starting out in web development, start learning from here »

Well, let's get straight into it.

Setting Up a Local Web Server
PHP script execute on a web server running PHP. So before you start writing any PHP program you need the following program installed on your computer.

The Apache Web server
The PHP engine
The MySQL database server
You can either install them individually or choose a pre-configured package for your operating system like Linux and Windows. Popular pre-configured package are XAMPP and WampServer.

WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database. It will also provide the MySQL administrative tool PhpMyAdmin to easily manage your databases using a web browser.

The official website for downloading and installation instructions for the WampServer: http://www.wampserver.com/en/

Creating Your First PHP Script
Now that you have successfully installed WampServer on your computer. In this section we will create a very simple PHP script that displays the text "Hello, world!" in the browser window.

Ok, click on the WampServer icon somewhere on your Windows task bar and select the "www directory". Alternatively, you can access the "www" directory through navigating the C:\wamp\www. Create a subdirectory in "www" directory let's say "project".

Now open up your favorite code editor and create a new PHP file then type the following code:

ExampleRun this code »
// Display greeting message
echo "Hello, world!";
?>
Now save this file as "hello.php" in your project folder (located at C:\wamp\www\project), and view the result in your browser through visiting this URL: http://localhost/project/hello.php.

Alternatively, you can access the "hello.php" file through selecting the localhost option and then select the project folder from the WampSever menu on the taskbar.

PHP can be embedded within a normal HTML web page. That means inside your HTML document you can write the PHP statements, as demonstrated in the follwoing example:

ExampleRun this code »



PHP Application


// Display greeting message
echo 'Hello World!';
?>


You will learn what each of these statements means in upcoming chapters.

0 Shares 0 Like •

(» Go Up)

You must Sign in or Sign Up to post content

For you to post content on this website you have to log in or register, it only take few minute to create account

Go Up

Recommended for you

How To Apply For Licence To Construct Power/ Elecgenerating Station In Kenya Small Business Marketing Strategies Worth Your Time And Money How To Prevent Your Car From Getting Stolen In Kenya Emotional Vs Intelligent - Developing A Betting Strategy That Helps You Win

Currently: 1 guest(s) reading this article

Ad Read latest Kenyan News here Visit Site

Sections: Business, Counties, Family, Naija Forums, Africa, Education, Technology Market, Phones, Art, Graphics & Video, Webmasters, Events, Sports, Photography, Gaming, K247 TV, Tanzania Forum, South Sudan Forum, Somalia Forum, Rwanda Forum, Burundi Forum,

About Us | Terms & Conditions | Privacy Policy | FAQ's | Disclaimer | Copyright | Contact Us | Advertise With Us | Download K247 APP | Marketplace | Moderator Policy | We Are Hiring | Kenya Radio and TV Stations Listen and Watch Live | Letter From the C.E.O | Kenya Radio Stations Live | Kenya TV Stations Live | Kenya - Newspapers and News Sites and popular blog | Forum Rules | Featured LinksFollow Us on TwitterLike Us on Facebook

Kenyans247 - Copyright © 2019 - 2021 Sande Kennedy. All rights reserved. See How To Advertise.
Disclaimer: Every Kenyans247 member is solely responsible for anything that he/she posts or uploads on Kenyans247.