How to run the script after submitting the form? (Condition: The fact that the script is included in index.html and must also be executed there) Thank you!
- @ VLADPRO100LORD, please clarify what you have done yourself and what did not work out. - mountpoint
- @mountpoint I made a ready-made form and have the script on hand, but I’m interested in how to do it without redirection. - VLADPRO100LORD
- Without special gestures for setting up a web server in html files, the php script will not run. the answer is no way. - zb '
|
1 answer
<script type="text/javascript"> function Func(){ alert("Форма отправлена!"); } </script> <form action="" method="POST" onSubmit="Func();"> <input type="hidden" name="name" value="value" /> <input type="submit" value="Отправить" /> </form> Sorry did not finish reading the question ...
I add:
<?php if(isset($_GET["name"])) { // Выполняете скрипт } ?> <form action="" method="GET"> <input type="text" name="name" /> <input type="submit" value="Отправить" /> </form> So what? I don't understand the question ...
- @AAT, Execute the PHP script after submitting the form. Read. - VLADPRO100LORD
- @ AAT, it looks like you answered correctly. - VLADPRO100LORD
- @AAT is not what I needed ... - VLADPRO100LORD
|