0
Good afternoon I would like to save data from a form of an html page when users register and commit in a pdf file and be sent to a predefined email but I do not know how to do this, I have the form created as follows:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Formulário</title>
</head>
<body>
<h2> Preencha o formulário abaixo para participar no curso de Linux Administração</h2><br/>
<form action="Script_do_Formulario.php" method="post">
<!-- DADOS PESSOAIS-->
<fieldset>
<legend>Dados Pessoais</legend>
<table cellspacing="10">
<tr>
<td>
<label for="nome">Nome: </label>
</td>
<td align="left">
<input type="text" name="email">
</td>
<td>
<label for="sobrenome">Apelido: </label>
</td>
<td align="left">
<input type="text" name="sobrenome">
</td>
</tr>
<tr>
<td>
<label>Data de Nascimento: </label>
</td>
<td align="left">
<input type="text" name="dia" size="4" maxlength="2" value="dd">
<input type="text" name="mes" size="6" maxlength="2" value="mm">
<input type="text" name="ano" size="8" maxlength="4" value="aaaa">
</td>
</tr>
<tr>
<td>
<label for="rg">Localidade: </label>
</td>
<td align="left">
<input type="text" name="rg" size="13" maxlength="13">
</td>
</tr>
<tr>
<td>
<label>Código Postal:</label>
</td>
<td align="left">
<input type="text" name="cpf" size="9" maxlength="9"> - <input type="text" name="cpf2" size="2" maxlength="2">
</td>
</tr>
</table>
</fieldset>
<br />
<!-- ENDEREÇO -->
<fieldset>
<legend>Morada</legend>
<table cellspacing="10">
<tr>
<td>
<label for="rua">Rua:</label>
</td>
<td align="left">
<input type="text" name="rua">
</td>
<td>
<label for="numero">Numero:</label>
</td>
<td align="left">
<input type="text" name="numero" size="4">
</td>
</tr>
<tr>
<td>
<label for="bairro">Localidade: </label>
</td>
<td align="left">
<input type="text" name="bairro">
</td>
</tr>
<tr>
<td>
<label for="estado">Distrito:</label>
</td>
<td align="left">
<select name="estado">
<option value="av">Aveiro</option>
<option value="be">Beja</option>
<option value="br">Braga</option>
<option value="bg">Bragança</option>
<option value="cb">Castelo Branco</option>
<option value="cm">Coimbra</option>
<option value="ev">Évora</option>
<option value="fr">Faro</option>
<option value="gd">Guarda</option>
<option value="lr">Leiria</option>
<option value="lx">Lisboa</option>
<option value="Pg">Portalegre</option>
<option value="pt">Porto</option>
<option value="st">Santarém</option>
<option value="sb">Setúbal</option>
<option value="vc">Viana do Castelo</option>
<option value="vr">Vila Real</option>
<option value="vs">Viseu</option>
<option value="im">Ilha da Madeira</option>
<option value="ia">Ilha dos Açores</option>
</select>
</td>
</tr>
<tr>
<td>
<label for="cidade">Cidade: </label>
</td>
<td align="left">
<input type="text" name="cidade">
</td>
</tr>
<tr>
<td>
<label for="cep">Código Postal: </label>
</td>
<td align="left">
<input type="text" name="cp" size="3" maxlength="4"> - <input type="text" name="cp2" size="2" maxlength="3">
</td>
</tr>
</table>
</fieldset>
<br />
<!-- DADOS DE LOGIN -->
<fieldset>
<legend>Contacto Email</legend>
<table cellspacing="10">
<tr>
<td>
<label for="email">E-mail: </label>
</td>
<td align="left">
<input type="text" name="email">
</td>
</tr>
</table>
</fieldset>
<br />
<input type="submit">
<input type="reset" value="Limpar">
</form>
</body>
</html>
Yes, because I never programmed in PHP
– Sergio Nunes
Add the php tag to your question.
– Giovanni Nunes
where exactly do I tag 'php' in my code? I wonder why I don’t understand where
– Sergio Nunes