Go Back   Web Hosting UK Forums | Linux Windows Dedicated Server and cPanel VPS Hosting Forum > Services > Web Designing and Development

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-07-2007, 10:19 PM
Senior Member
 
Join Date: May 2007
Posts: 142
Default PHP MySQL Basics

Hello everybody,
may be this is new but let me say that everyone on this forum has a web site or want to own own one and most of them are using pre-programmed scripts and sites like JOOMLA,MAMBO,PHPNUKE,POSTENUKE,WORDPRESS,PHPBB,VB, SMF...etc

But have you ever think about creating your own site? and make your own thoughts go alive!?

So , let's start here:

What we do need is a local server to be able to interpret PHP and manage MySQL and set up an HTTP server that's Apache.
Ok, just download the latest wamp server that has all that tools on : wampserver.com then install and let we start.

when you see the wamp's icon change from red to yellow then white , it does mean that both Apache2 and MySQL are running and to create our local sites we need to put our scripts into its WWW directory which should be in :

'c:\wamp\www\' , if you choosed C if not look where you installed it.

Now create a directory inside the above 'c:\wamp\www\' like 'test' and then create a simple text file called 'index.php' , so that we can access through any web browser like mozilla,IE,opera... from this address:

localhost/test/
________________________________________

Let's start now on the real phase , open the file called index.php with an editor , I recommend phpdesigner.dk/phpdesigner2007_setup.exe
and add what tells the interpreter 'THIS IS A PHP SCRIPT' ,

Code:
the code above give us the ability to write any php script in between the symbols, and we must write that or our interpreter won't do anything!

As we all know this kind of scriptured languages are run on the server side and then the server sends us the result which always appear like an HTML page, so to print a sinple text we can use some instructions like 'echo' , or 'print' and then we see the result sent by executing this echo or print.

try this :
Code:
if you have noticed there is always a ';' after every command and this is to tell our beloved interpreter we're done with our instruction parameters.

after run that simple script you may see that both Hellos are Written like that 'Hello , world!Hello , world!' and you want it to be more meanningful , all what you have to do is to add the simple HTML trick the
, so it would be like this :
Code:
';

print 'Hello . world!';

?>
___________________________________
This was the starting and if any body likes this post and wanna continue just tell me here
Next lessons will more more useful for beginners then we swap to advanced
Reply With Quote
  #2 (permalink)  
Old 05-07-2007, 11:09 PM
Senior Member
 
Join Date: May 2007
Posts: 142
Default

Why isn't my code appeard on the [ code ] table?????

I think it should be just printed out not executed or banned!:eek:
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:35 AM.
Copyright 2002-2007 WebHosting.uk.com. All rights reserved.
Web Hosting UK Forum