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)
2 odpowiedzi
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>
0
Thanks for your reply but i am required to keep html and php sepreate is there a way i could do that ?