<?php
$info='
<table border="1px solid">
<form action="?" method=post>
<tr height="45px">
<td> Usuario</td>
<td><input type="text" name="nom" required="required" /></td>
</tr>
<tr height="45px">
<td> Password</td>
<td><input type="password" name="pw" required="required" /></td>
</tr>
<tr height="45px">
<td colspan="2"><input type="submit" name="enviar" value="Enviar datos"/>
<input type="reset" name="borrar" value="Linpiar Formulario" /></td>
</tr>
</form>
</table>
';
print $info;
?>
// aqui, la variable $info, te imprime un formulario, pero tambien la puede llevar a la db y llamarla cunado quieras.
- Por el contrario deseas guardar el contenido de las variables del formulario:
<table border="1px solid">
<form action="?" method=post>
<tr height="45px">
<td> Usuario</td>
<td><input type="text" name="nom" required="required" /></td>
</tr>
<tr height="45px">
<td> Password</td>
<td><input type="password" name="pw" required="required" /></td>
</tr>
<tr height="45px">
<td colspan="2"><input type="submit" name="enviar" value="Enviar datos"/>
<input type="reset" name="borrar" value="Linpiar Formulario" /></td>
</tr>
</form>
</table>
<?php
extract($_REQUEST);
print $nom. " - " . pw;
// significa que si se imprimen las variables provenietes de html, entonces se pueden llevara mysql
// el aso siguiente es crear una conexion a mysql, pero esa es otra historia
// espero te ayude a aclara tus dudas.
<h1>Alberto. </h1>
?>