Question:
What is PHP, is it like HTML?
Nel
2010-05-02 06:14:25 UTC
OK, so I started learning HTML a few years ago and so far, I know the basics;
mailto: command
IMG SRC command
etc

So what is PHP, can you do more with PHP. What I actually want to do is embed an email form into a HTML document and I know that the only command that supports this is mailto: in HTML but that just opens the default email program, what I want to do is embed the email form. So can I accomplish this in PHP. Is PHP hard to learn. Is it simpler that HTML?
Please Help?
Thanks in Advance!
Eleven answers:
anonymous
2010-05-02 06:32:02 UTC
If you really want to learn how to do this, I suggest you buy this book:



http://www.amazon.com/dp/1590598628/



It teaches you everything you need to do, in a much more efficient way than asking it on this site. If you're still stuck, you can of course ask your question here!
hemalatha
2016-04-20 04:53:18 UTC
PHP and HTML interact a lot: PHP can generate HTML, and HTML can pass information to PHP. Before reading these faqs, it's important you learn how to retrieve variables from external sources. The manual page on this topic includes many examples as well.

PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly.
?
2010-05-02 06:52:38 UTC
PHP is a more advanced type of programming, but is certainly very easy to learn and apply due to the wonderful community that supports it.



PHP is indeed a serverside scripting that is compiled whenever the page is accessed, and puts out raw HTML, this means it is extremely compatible with browsers since no additional software is needed on a browser.



PHP can pretty much do everything you can imagine with a computer and data, it can handle $_POST which I think you are trying to do with handling form data... and using PHP's built in mail(); function to send an email thru the site, rather than thru an email client installed on the visitor's computer.



I highly recommend using Ariesoft Winsyntax, it makes coding in PHP very easy (it is still freehand) but it actually colors syntaxes say you can see where errors are...



http://www.winsyntax.com/



Its free to download and use, and is just like notepad (and yes, you could use just notepad, but you have to tab over alot, which can be a pain)



Just save the file as .php, and if the server has PHP installed, it will process the .php extension and output HTML for the user...



Here is a great tutorial on basic form handling in PHP:



http://www.tizag.com/phpT/forms.php



You can use http://www.tizag.com for all kinds of HTML, CSS, and PHP tutorials.



Good luck
David
2010-05-02 10:45:11 UTC
Introduction to PHP



PHP is a server-side scripting language, which is different from HTML and JavaScript commands that are processed in a browser (Internet Explorer or Firefox for example). Expanding on this thought, consider these differences: when your browser requests a URL (http://www.voyagerwd.com for example) the server sends the HTML / JavaScript code to your browser. Your browser has the responsibility to display the results from the HTML / JavaScript commands. There are two important points to realize:



* When you request a URL, the server sends the HTML / JavaScript to your computer for processing by the browser.

* Your browser has no capability to send programs, commands or data to the server. PHP is different. PHP commands are processed by the server before they are sent to your browser. You see the results when they are passed from the server to your browser.



Running a PHP script

To run an HTML script, you can save the script anywhere you want on your computer -such as the desktop- and it will run in your browser. Not so with PHP. PHP must be run on a server. To run a PHP program on your computer, you must install server software on your computer. A commonly used (free) server is Apache.

Creating PHP Scripts

When you write an HTML / Javascript program, PHP scripts can be included. Here is the important difference. HTML commands start with an open bracket ( < ) and end with a closing bracket ( > ), PHP commands however, starts with . You can insert PHP scripts anywhere in your Web page. When you request a URL, the server determines what is sent to your browser and what is processed on the server. PHP scripts can be included anywhere in the HTML code and the PHP will be found a processed on the server. PHP files are usually given the ".php" extension.



Simple Example


echo 'We started out in PHP'

?>





This is my heading




This is now in the PHP world

include("someFileName.inc.php")

?>



PHP Applications

PHP is used to accomplish special tasks. Some PHP commands overlap JavaScript commands but that is for another more advanced discussion. Here are a very small list of applications allowed by the PHP capability.



* PHP Mail: PHP use a mail() function to send email from a web page. The mail function allows:multiple recipients, subjects, bcc, etc.

* PHP Database Interface: PHP is used to communicate with a database. PHP ( or another server side language) is used to provide communication between an HTML form and a compatible database such as MySQL. When someone registers online -for example- using an HTML form, the information is sent from the form to the database using a combination of HTML and PHP. Again, this is not possible with HTML or JavaScript alone because these scripts can't send data to the server.

* Include Function: PHP commands have an "include()" function that provides the ability to reuse PHP code anywhere. This valuable feature allows the programmer to reuse -for example- a menu on more than one web page. This reduces programming time by allowing you to change the menu code on all the web page by changing only the include() file.
homervillanueva
2010-05-02 06:21:43 UTC
PHP is a server side scripting whereas HTML is not. When we say PHP, it is executed on the PHP enabled web server.



Normally you can accomplish lot of things using PHP. You can embed HTML forms, send the data to the server and then process these data using PHP like emailing it to your friends or save it to a database.



PHP is quite harder to learn compare to HTML.
?
2010-05-02 06:18:56 UTC
PHP is server side programming, which means that you will need a server with PHP installed and running on it.

But as for learning PHP:

http://www.w3schools.com/php/php_intro.asp



Really useful tutorial
frometa
2016-12-05 01:03:24 UTC
Use physique or indoors physique attempt to locate greater clarification for tag frameset on the cyber web, or use iframe use assets src , direct it to the html report which you want to ought to apply it repetitively, once you utilize server area scripting you ought to use #contain in ASP, or require() / contain() in very own homestead page or, in basic terms replica paste it, or the alternative path, which you've got the capacity to create a million template report, then, everytime you should create a sparkling website, open the template report, shop using fact the style new website you want to ought to create, then start to create the style new cyber web website content textile.
Martin
2010-05-02 06:20:13 UTC
check the www.w3schools.com website out - you can do a massive amount with php, it is also extremely useful for integrating into databases etc so you can run a much more dynamic website
Tau
2010-05-02 06:17:07 UTC
http://www.w3schools.com/php/php_intro.asp
anonymous
2016-09-13 10:49:38 UTC
It depends on many things
?
2010-05-02 06:18:27 UTC
I Think It is More or Less the Same


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...