How do I link HTML code with PHP? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How do I link HTML code with PHP?

I don’t know how to link the HTML hide with the php code. Can anyone help me?

30th Jun 2019, 9:56 PM
Dami
3 Answers
+ 9
<script language="php"> echo "Hello World!"; However, in modern browsers it is recommended to use the: <?php ?> Inside the <body> tag. However you're welcomed to use the shorthand: <? ?> As long as it's supported by the browser. I'll prefer you complete the php course before posting so as to get familiar with the language.
30th Jun 2019, 10:06 PM
Jella
Jella - avatar
+ 2
If you want it really separated use ajax
30th Jun 2019, 10:16 PM
Lexfuturorum
Lexfuturorum - avatar
+ 1
thanks a lot !
30th Jun 2019, 10:26 PM
Dami