Skip to content
Advertisement

How to make HTML heading use PHP variables in a PHP file

for a project I need to make a PHP file that gives back a reservation response and in the Heading of the response I need to have a Bold heading in big letters that says “Thank you John Smith for your Reservation”. I know I can use before the php code but when I do i cant get my variables to work.

Note: John Smith is just a example, I need the name to pop up as what someone enters from the field so basically a non-static heading.

Thank you for your time 😀

JavaScript

Advertisement

Answer

You can use it like that

JavaScript

I can suggest you – check how to trim input data. Because your code now is vulnerable. You can check this topic in SO – PHP need to trim all the $_POST variables

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement