Linking php into html (beginner)

3 days ago 4
ARTICLE AD BOX

I'm making a project for my friends and in short I'm not good at programming.

I made a SQL database which I want to display on the site.

I have a html site where I first put <a href>, but no URL I can think of works (my php file is in htdocs). Now I made a submit form with post method. It does open the php site in the same window, but the content is literally my php file. Am I doing something wrong?

My html file (part):

<form action="C:\xampp\htdocs\playlisty.php" method="post"> <input type="submit" class="buttonm" value="Show"> </form>

My php file (whole, I only wanted to test if it will open properly, so there's no real code here):

<DOCTYPE! html> <html> <body> <?php if($_SERVER["REQUEST_METHOD"] == "POST"){ echo "Siema"; } ?> </body> </html>

Content of the php site:

enter image description here

I've tried a few methods which I found on the internet, but they didn't work for me. I also heard about changing the html file into php, but I don't want to do it, as it is a subpage and I'm not sure I'd manage to change everything correctly.

Edit: I also have external js file connected to all of html, so I'd really love a non invasive (?) solution

Read Entire Article