+ 1
How to use php
Im taking the php course and it doesnt mention where could php be writen, is it like js could i write it in note pad and just include it in the html file like this :<?php src='my.php' php> whats the right way to use it?
7 Antworten
+ 1
It can be written where you would write html. Difference being that to start and end html, you use "<html>" and "</html>". For php you start and end it with "<?php" and "?>"
(not including " ")
Just remember that you have to save your files as .php.
Also, dont worry about the filetype as it won't change how you write normal html and css in there.
+ 1
No , it needs a compiler.
You may use xampp or wampp for creating localhost on your computer or laptop and put your programs on it and open them by localhost address (127.0.0.1) in a browser
+ 1
I could send you my first ever php document that I got. It helped me getting started ny showing some simple php variables inside an already good html file
+ 1
Yeah you do. Late reply since i forgot it was in another language, heh.. But here you go.
Pastebin.com/A3RGnihA
+ 1
That's cool help alot thankyou man
+ 1
I can see now that you'll get a few errors, but hopefully you'll see where they are and why
0
MarKusS yes that would be nice
What about a form? Do i just do action ='file.php' ??