Answer the question
In order to leave comments, you need to log in
How to run php script directly in html?
Good afternoon! I ’ll immediately turn to the question:
Is it possible to run a php script directly in html without the help of a file, i.e.
Replace so that the php script itself is in HTML and can be executed when the Ps button is pressed,
the script is assigned to send order details to telegrams
<form action="login.php" method="post">
Answer the question
In order to leave comments, you need to log in
Something like this is possible:
<?php
// form.php
// во время загрузки станицы проверить была ли отправлена форма:
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// ... сделать то что вам нужно
}
?>
<form action="" method="post">
php is running ON THE SERVER. Before you get the html on the client, you can say getting it on the client is the result of the php script running on the server. To this the answer is no.
the script is assigned to send order details to telegramNothing to do with the first part of the question, I would say that the idiocy of the first part of the question is unnecessarily complicated. Most likely, you need something completely different, but you are dragging a fantastic implementation option into your Wishlist, generated by your deep misunderstanding of the web stack.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question