0

How can i make a form in html and it posts to a php doc but still remains on the same page and displays like a little message ( i am trying to make a login page so trying to figure this out)

7th Feb 2017, 5:23 PM
Fateen Ahmad
Fateen Ahmad - avatar
2 Respostas
0
Or do everything on a php only page or create a php page with an include ("pag_val.php"); Anyway if you are in PHP. Exemple: "index.php" = <?php if(isset($_POST['send'])){ $nome = $_POST['nome']; $numb = $_POST['numb']; echo "<script type='text/javascript'>alert('".$nome." Number: ".$numb."');</script>"; } ?> <!DOCTYPE html> <html> <head> <title>FORM</title> <meta charset="utf-8"> </head> <body> <form method="POST" action="index.php"> <input type="text" name="nome"> <input type="number" name="numb"> <input type="submit" name="send" value="SEND"> </form> </body> </html>
7th Feb 2017, 9:09 PM
Jônatas Araripe
Jônatas Araripe - avatar
0
Thanks for your reply but i am required to keep html and php sepreate is there a way i could do that ?
7th Feb 2017, 9:19 PM
Fateen Ahmad
Fateen Ahmad - avatar