Should input fields in an HTML form be within the PHP section of a script?
No, input fields in an HTML form should not be within the PHP section of a script. Input fields should be placed within the HTML form tags in order to collect user input. PHP code should be used to process the form data after it has been submitted.
<form method="post" action="process_form.php">
<input type="text" name="username">
<input type="password" name="password">
<input type="submit" value="Submit">
</form>
Related questions
-
Windows Server 2003 index.php troubleshooting
-
caching opcode profiling
-
PHP-CLI hosting providers shell access