answersLogoWhite

0

How do you use PHP?

Updated: 8/9/2023
User Avatar

Wiki User

12y ago

Best Answer

The outline of PHP is rather simple to understand; developing projects in PHP is more difficult.

PHP, in a nutshell, is a language meant to output other languages, or plain text, depending on specific factors. PHP itself does not "display pictures" or anything of the sort -- it sends different languages (like HTML) to "display pictures."

The beauty of PHP is that everything it makes is what we call "dynamic;" meaning by visiting the same web page ran by PHP, it's possible to get something different every time (of course, that's set up by you).

For example, imagine you are on a website that incorporates PHP. This website asks you to log into an account you made earlier today.

  1. An HTML form is sent to the user
  2. The user submits the form, sending a username and password to the server
  3. PHP is the engine that checks if your username exists, and that the password you provided is correct
  4. If you logged in successfully, you will get some HTML stating so - sent by PHP. If the login failed (for example, you gave an incorrect password), you will get some different HTML.

Some understand PHP better than others, due to prior math and technology knowledge, and mere fate. Don't be discouraged if you cannot understand it at first - concept or syntax - as it isa difficult thing to grasp.

If you're still confused (which is perfectly reasonable!), visit the related links below. They have some excellent examples explaining the power of PHP and on writing your own PHP scripts.

You can use PHP for create various user friendly and search engine friendly web applications.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

Its done exactly the same as when you create one in HTML except you put it in PHP. I have created an example below to show you how it is done! The example also shows you how to use the form data in PHP.

<?php

// your form

echo "<form method='POST'>

<input type='text' name='my_field'>

<input type='submit' name='submit_form'>

</form>

<br /><br />";

// output what you type in the field when you submit it

if ($_POST['submit_form']) {

echo "This is what you typed in my_field: ".$_POST['my_field'];

}

?>

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you use PHP?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the use of a question mark in php?

It is used to tell the sever to use the PHP parser. To begin php you must use &lt;?php, and to end it, it is ?&gt;.


How do you use PHP in HTML?

You can't use PHP in an HTML document, but you can use HTML in PHP script.


What is the default extension that most Web servers use to process php scripts?

PHP files extension is .php


Why should you use PHP and not JSP?

Firstly, this is wrong question. The right one would be WHEN should you use PHP, not JSP? or, WHEN should you use PHP and WHEN JSP?


How do you use XML in PHP?

PHP 5 has a XML parser called SimpleXML that you could use.


How do you create a web mail script using PHP?

You can use phpMailer() Or, you can use mail() PHP function to send emails via PHP script.


What is a PHP certificate?

PHP certification is received after doing some sort of PHP course, there are many out there to do. You can use them in your CV to help you get a job in PHP.


Which PHP version does Facebook use?

Facebook uses PHP 5.


What are the PHP tags?

There are no PHP tags. Unlike HTML, PHP is not Markup language. They use scripts. An example would be &lt;?php echo "Hello, World!"; ?&gt;


What is php 5.1 software?

That's PHP Engine.. Allow you to develop PHP Scripts.. you can use it to develop PHP Scripts and test it on your local machine before you send it to server.. (your website)


What scripting engine does PHP use?

PHP itself is a scripting language, and uses it's own PHP interpreter (engine).


Why do we use Php?

PHP is an Open Source Scripting Language. We can create Web Pages and Web Applications using PHP.