What is PHP, is it like HTML?
-
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!
-
Answer:
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!
Nel at Yahoo! Answers Visit the source
Other answers
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 <?php and end 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 <?PHP echo 'We started out in PHP' ?> <HTML> <body> <h1>This is my heading</h1> <?PHP 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.
David
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.
homervillanueva
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
SuperNova
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
Martin
I Think It is More or Less the Same
Ayrty
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
Daniel
Related Q & A:
- What Will My Baby Look Like Online?Best solution by Yahoo! Answers
- What My Baby Will Look Like?Best solution by Yahoo! Answers
- What Safe Websites Are There Like Moviestarplanet?Best solution by Yahoo! Answers
- What is the best language for HTML parsing and web scraping?Best solution by Quora
- What are the dutch people like? what do they think of english people?Best solution by Quora
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.