Ich brauche meine Form aus, um wie das folgende Beispiel zu generieren, statt alle EX-Abstand. Hallo _______, wie machst du das ______? Hoffe, du hast eine wundervolle Zeit _____________. bitte hilfe! Ich bin neu in der Programmierung!Wie kann ich mein Formular für mein Formular anzeigen lassen?
<html>
<head>
<title>Test1-1</title>
</head>
<body>
<?php
if (filter_has_var(INPUT_POST, "userName")){
// the form exists, so work with it
$userName = filter_input(INPUT_POST, "userName");
print "<h2>Hi $userName</h2>";
}
if(filter_has_var(INPUT_POST, "morning")){
filter_input(INPUT_POST, "morning");
print"<h2>how are you doing this morning?</h2>";
}
if(filter_has_var(INPUT_POST, "afternoon")){
print"<h2>how are you doing this afternoon?</h2>";
filter_input(INPUT_GET, "afternoon");
}
if(filter_has_var(INPUT_POST, "evening")){
print"<h2>how are you doing this evening?</h2>";
filter_input(INPUT_POST, "evening");
}
if(filter_has_var(INPUT_POST, "plan")){
$plan = filter_input(INPUT_POST, "plan");
print "<h2>Hope you have a wonderful time $plan</h2>";
}
//there's no input. Create the form
print <<< HERE
<form action ="" method = "post">
<fieldset>
<label>Please enter your name</label>
<input type = "text"
name = "userName"/><br>
<label>Time of Day</label>
<input type = "checkbox"
name = "morning"/>
<label>Morning</label>
<input type = "checkbox"
name = "afternoon"/>
<label>Afternoon</label>
<input type = "checkbox"
name = "evening"/>
<label>Evening</label><br>
<label>What are your plans?</label>
<input type = "text"
name = "plan"/><br>
<button type = "submit">
submit
</button>
</fieldset>
</form>
HERE;
// end 'value exists' if
?>
</body>
</html>