FSTUTS FORUMERS
Dont forget to join!

Please Read the forum rules and regulations before posting^_^

Thank You!

PHP BASICS

View previous topic View next topic Go down

PHP BASICS

Post by mrs3m0 on Sat Jun 27, 2009 1:31 am

What is PHP?

PHP ("PHP: Hypertext Preprocessor") is a widely-used Open Source general-purpose scripting language. It basically contains text, HTML tags and scripts.

Here's a basic example: (basic.php)

Code:

<html>
    <head>
        <title>Example</title>
    </head>
    <body>

        <?php
        echo "Hi, I'm a PHP script!";
        ?>

    </body>
</html>

PHP echo() statement is used to display the string "Hi, I'm a PHP script!"

Download the code basic.php here

Getting the value from a text field using PHP

1. Create an simple html file (I name it dev_1.html)
Code:


<form action="action.php" method="post">
 Your name: <input type="text" name="name" />
 Your age: <input type="text" name="age" />
 <input type="submit" />
</form>


Preview:

Your name:
Your age:



Download the code dev_1.html here

2. Create a php file (action.php)
Code:

Hi <?php echo $_POST['name']; ?>.
You are <?php echo $_POST['age']; ?> years old.

Download the code action.php here


Last edited by mrs3m0 on Sun Jun 28, 2009 6:32 pm; edited 1 time in total (Reason for editing : Update tutorial)

mrs3m0
FTTF Tutor
FTTF Tutor

Posts : 10
Reputation : 2
Join date : 2009-06-10

Back to top Go down

Re: PHP BASICS

Post by [PLAYBOY] POSER.FACE on Sun Jun 28, 2009 9:41 am

well, thnx for sharing..

_________________

avatar
[PLAYBOY] POSER.FACE
ADMIN
ADMIN

Posts : 71
Reputation : 19
Join date : 2009-05-26
Age : 24
Location : PLAYBOY COUNTRY

Back to top Go down

Re: PHP BASICS

Post by `qulata.3o94 :) on Fri Aug 14, 2009 9:46 pm

hayz..... thnks thnks thnks Smile
avatar
`qulata.3o94 :)
MOD
MOD

Posts : 141
Reputation : 12
Join date : 2009-07-02
Age : 23
Location : earth :)

http://qlt94.webs.com

Back to top Go down

Re: PHP BASICS

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum