0
Create a simple HTML form and accept the user name and display the name through PHP echo statement? This code isnt work😑
<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>hello everyone</title> </head> <body> <form method='POST'> <h2>Enter your name</h2> <input type="text" name="name"> <input type="submit" value="submit"> </form> <?php $name=$_POST['name']; echo "<h2>hello $name</h2>"; ?> </body> </html>
2 odpowiedzi
0
You are posting something but you didn't mention to where.
Add "action" to the "form"
https://www.w3schools.com/tags/att_form_action.asp
0
Create html code to display your name, department and include the following attribute background color, text formatting