Estado: Terminado

Formulário php

Detalles del proyecto:
Presupuesto: Abierto
Publicado: Hace 3 años
Duración del proyecto: 1 - 4 semanas
Horas requeridas: No definido
Propuestas: 3
Freelancers interesados: 4

Habilidades requeridas: IT & Programación C PHP HTML SQL XHTML CSS

Descripción:
Olá
Tenho um formulário para meu site
O código já está todo pronto porém quero apenas que quando o usuário preencha os dados os dados preenchidos vá para o email dele.
Não estou conseguindo anexar e mandarei por aqui mesmo o código:
primeiro código:
cadastra_usuario.php
<!doctype html public "-//w3c//dtd xhtml 1.0 Transitional//En" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd&quot;>
<html xmlns="http://www.w3.org/1999/xhtml&quot;>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<div align="center"><img src="marca.gif" width="625" height="141" />
</div>
<table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="224" height="140">&nbsp;</td>
<td width="252">&nbsp;</td>
<td width="174">&nbsp;</td>
</tr>
<tr>
<td height="24">&nbsp;</td>
<td valign="middle">
<font color="#FF0000"><b>
<?php
// inclui o arquivo de configuração do sistema
include "Config/config_sistema.php";
// recebe dados do formulario
$login = htmlspecialchars($_POST['login']);
$senha = $_POST['senha'];
$rep_senha = $_POST['rep_senha'];
$nome = htmlspecialchars($_POST['nome']);
$email = htmlspecialchars($_POST['email']);
$sexo = $_POST['sexo'];
$dia = $_POST['dia'];
$mes = $_POST['mes'];
$ano = $_POST['ano'];
$pais = $_POST['pais'];
$estado = $_POST['estado'];
$cidade = $_POST['cidade'];
$cep = $_POST['cep'];
$pergunta = htmlspecialchars($_POST['pergunta']);
$resposta = htmlspecialchars($_POST['resposta']);
// verifica se o usuario digitou o login
if($login == "") {
echo "Digite seu login!";
exit;
} else {
// se o usuario digitou o login ele verifica
// se esta disponivel
$consulta = mysql_query("select * from dados_usuarios where Login = '$login'");
$linha = mysql_num_rows($consulta);
if($linha != 0) {
echo "O nome de usuario que você<br>
Digitou já existe tente outro!";
exit;
}
}
// verifica se o usuario digitou a senha
if($senha == "") {
echo "Digite sua senha!";
exit;
} else {
// se o usuario digitou a senha
// vamos comparar com a contra senha
if($senha != $rep_senha) {
echo "Senha invalida!";
exit;
}
}
// verifica se o usuario digitou o nome
if($nome == "") {
echo "Digite seu nome!";
exit;
}
// verifica o email
if($email == "") {
echo "Digite o seu e-mail!";
exit;
}
// verifica o sexo
$arr_sexo = array('Masculino','Feminino');
if(!in_array($sexo,$arr_sexo)) {
echo "Escolha o seu sexo!";
exit;
}
// verifica a data de nascimento do usuario
// verifica o dia
if($dia == "") {
echo "Escolha o dia que você nasceu!";
exit;
} else {
// verifica o mes
if($mes == "") {
echo "Escolha o mês que você nasceu!";
exit;
} else {
// verifica o ano
if($ano == "") {
echo "Escolha o ano que você nasceu!";
exit;
} else {
// se o Dia, o Mês e o Ano passaram
// vamos juntalos numa so varivel
$data_nasc = $dia."/".$Mes."/".$Ano;
}
}
}
// verifica o pais
if($pais == "") {
echo "Digite o país onde você mora!";
exit;
}
// verifica o estado
if($estado == "") {
echo "Digite o estado onde você mora!";
exit;
}
// verifica a cidade
if($cidade == "") {
echo "Digite a cidade onde você mora!";
exit;
}
// verifica o cep
if($cep == "") {
echo "Digite o CEP de onde você mora!";
exit;
}
// verifica a pergunta secreta
if($pergunta == "") {
echo "Digite sua pergunta secreta!";
exit;
}
// verifica a resposta secreta
if($resposta == "") {
echo "Digite sua resposta secreta!";
exit;
}
// faz consulta no banco para inserir os dados do usuario
$sql = "insert into dados_usuarios (ID,Login,Senha,Nome,Email,Sexo,DataNasc,Pais,Estado,Cidade,Cep,Pergunta,Resposta) values ('','$login','$senha','$nome','$email','$sexo','$data_nasc','$pais','$estado','$cidade','$cep','$pergunta','$resposta')";
$consulta = mysql_query($sql);
// verifica se o usuario foi cadastrado
if($consulta) {
echo "<font color=green><b>
Você foi cadastrado com sucesso!<br>
Click <a href=index.php>aqui</a> para efetuar o login.
</Font></b>";
exit;
} else {
echo "Não foi possivel efetuar o seu cadastro<br>
tente mais tarde pode ser um problema no servido!<br>
Click <a href=index.php>aqui</a> para ir ate a home page do sistema.";
Exit;
}
?>
<!--Dwlayoutemptycell--> &nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="148">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>
segundo código:
cadastro.php
<!doctype html public "-//w3c//dtd xhtml 1.0 Transitional//En" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd&quot;>
<html xmlns="http://www.w3.org/1999/xhtml&quot;>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {font-size: 36px}
.style2 {color: #FF0000}
.style3 {
color: #FFFFFF;
font-weight: bold;
}
.style5 {font-size: 12px}
.style6 {color: #666666; font-weight: bold; }
.style7 {color: #000000}
.style9 {color: #FF0000; font-weight: bold; }
-->
</style>
</head>
<body>
<form action="cadastra_usuario.php" method="post" enctype="multipart/form-data" name="formcadastro">
<div align="center"><img src="marca.gif" width="625" height="141" />
</div>
<table width="753" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="123" height="5"></td>
<td width="62"></td>
<td width="38"></td>
<td width="11"></td>
<td width="66"></td>
<td width="62"></td>
<td width="18"></td>
<td width="30"></td>
<td width="71"></td>
<td width="81"></td>
<td width="76"></td>
<td width="12"></td>
<td width="103"></td>
</tr>
<tr>
<td height="23"></td>
<td></td>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td colspan="6" valign="top"><div align="center"><font size="4" face="Verdana, Arial, Helvetica, sans-serif">
<strong>Cadastro de Clientes</strong> <br />
</font></div></td>
<td>&nbsp;</td>
<td></td>
<td></td>
</tr>
<tr>
<td height="15"></td>
<td></td>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="22"></td>
<td></td>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
<td></td>
<td colspan="2" valign="top" class="style6"><a href="index.php" class="style7">Home</a></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="45">&nbsp;</td>
<td>&nbsp;</td>
<td colspan="9" valign="top"><p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Insira
os seus dados para que possamos efetuar o cadastro!<br />
<span class="style2">Aten&ccedil;&atilde;o:</span> Os campos que contiverem
(<span class="style2">*</span>) s&atilde;o obrigarotios ! </strong></font></p></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="344">&nbsp;</td>
<td colspan="11" valign="top"><table width="100%" border="2" bordercolor="#FFFFFF" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="149" rowspan="2" align="right" valign="middle" bgcolor="#000000"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><span class="style3">Login:</span></font></td>
<td width="349" height="24" valign="middle" bgcolor="#CCCCCC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<label for="textfield"></label>
<input name="login" type="text" id="login" size="40" maxlength="200" />
<span class="style9">*</span></font></td>
</tr>
<tr>
<td height="2"><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
<tr>
<td height="24" align="right" valign="middle" bgcolor="#000000" class="style3"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Senha:</font></td>
<td valign="middle" bgcolor="#CCCCCC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<label for="label"></label>
<input name="senha" type="password" id="label" size="20" maxlength="15" />
<span class="style9">*</span><span class="style5"> No m&aacute;ximo
15 caracteres!</span></font></td>
</tr>
<tr>
<td height="24" align="right" valign="middle" bgcolor="#000000" class="style3"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Repetir
senha: </font></td>
<td valign="middle" bgcolor="#CCCCCC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<label for="label2"></label>
<input name="rep_senha" type="password" id="label2" size="20" maxlength="15" />
<span class="style9">*</span></font></td>
</tr>
<tr>
<td height="24" align="right" valign="middle" bgcolor="#000000" class="style3"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Nome:</font></td>
<td valign="middle" bgcolor="#CCCCCC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<label for="label3"></label>
<input name="nome" type="text" id="label3" size="40" maxlength="200" />
<span class="style9">*</span></font></td>
</tr>
<tr>
<td height="24" align="right" valign="middle" bgcolor="#000000" class="style3"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">E-mail:</font></td>
<td valign="middle" bgcolor="#CCCCCC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<label for="label4"></label>
<input name="email" type="text" id="label4" size="40" maxlength="200" />
<span class="style9">*</span></font></td>
</tr>
<tr>
<td height="24" align="right" valign="middle" bgcolor="#000000" class="style3"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Sexo:</font></td>
<td valign="middle" bgcolor="#CCCCCC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<input name="sexo" type="radio" value="Masculino" id="radiobutton" />
<label for="radiobutton">Masculino
<input name="sexo" type="radio" value="Feminino" id="radio" />
Feminino<span class="style9">*</span></label>
</font></td>
</tr>
<tr>
<td height="26" align="right" valign="middle" bgcolor="#000000" class="style3"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Data
de nascimento: </font></td>
<td valign="middle" bgcolor="#CCCCCC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Dia
<label for="select"></label>
<select name="dia" id="dia">
<option value=""> </option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
/ M&ecirc;s
<label for="label5"></label>
<select name="mes" id="label5">
<option value=""> </option>
<option value="01">Janeiro</option>
<option value="02">Fevereiro</option>
<option value="03">Mar&ccedil;o</option>
<option value="04">Abril</option>
<option value="05">Maio</option>
<option value="06">Junho</option>
<option value="07">Julho</option>
<option value="08">Agosto</option>
<option value="09">Setembro</option>
<option value="10">Outubro</option>
<option value="11">Novembro</option>
<option value="12">Dezembro</option>
</select>
/ Ano
<label for="label6"></label>
<select name="ano" id="label6">
<option value=""> </option>
<option value="1900">1900</option>
<option value="1901">1901</option>
<option value="1902">1902</option>
<option value="1903">1903</option>
<option value="1904">1904</option>
<option value="1905">1905</option>
<option value="1906">1906</option>
<option value="1907">1907</option>
<option value="1908">1908</option>
<option value="1909">1909</option>
<option value="1910">1910</option>
<option value="1911">1911</option>
<option value="1912">1912</option>
<option value="1913">1913</option>
<option value="1914">1914</option>
<option value="1915">1915</option>
<option value="1916">1916</option>
<option value="1917">1917</option>
<option value="1918">1918</option>
<option value="1919">1919</option>
<option value="1920">1920</option>
<option value="1921">1921</option>
<option value="1922">1922</option>
<option value="1923">1923</option>
<option value="1924">1924</option>
<option value="1925">1925</option>
<option value="1926">1926</option>
<option value="1927">1927</option>
<option value="1928">1928</option>
<option value="1929">1929</option>
<option value="1930">1930</option>
<option value="1931">1931</option>
<option value="1932">1932</option>
<option value="1933">1933</option>
<option value="1934">1934</option>
<option value="1935">1935</option>
<option value="1936">1936</option>
<option value="1937">1937</option>
<option value="1938">1938</option>
<option value="1939">1939</option>
<option value="1940">1940</option>
<option value="1941">1941</option>
<option value="1942">1942</option>
<option value="1943">1943</option>
<option value="1944">1944</option>
<option value="1945">1945</option>
<option value="1946">1946</option>
<option value="1947">1947</option>
<option value="1948">1948</option>
<option value="1949">1949</option>
<option value="1950">1950</option>
<option value="1951">1951</option>
<option value="1952">1952</option>
<option value="1953">1953</option>
<option value="1954">1954</option>
<option value="1955">1955</option>
<option value="1956">1956</option>
<option value="1957">1957</option>
<option value="1958">1958</option>
<option value="1959">1959</option>
<option value="1960">1960</option>
<option value="1961">1961</option>
<option value="1962">1962</option>
<option value="1963">1963</option>
<option value="1964">1964</option>
<option value="1965">1965</option>
<option value="1966">1966</option>
<option value="1967">1967</option>
<option value="1968">1968</option>
<option value="1969">1969</option>
<option value="1970">1970</option>
<option value="1971">1971</option>
<option value="1972">1972</option>
<option value="1973">1973</option>
<option value="1974">1974</option>
<option value="1975">1975</option>
<option value="1976">1976</option>
<option value="1977">1977</option>
<option value="1978">1978</option>
<option value="1979">1979</option>
<option value="1980">1980</option>
<option value="1981">1981</option>
<option value="1982">1982</option>
<option value="1983">1983</option>
<option value="1984">1984</option>
<option value="1985">1985</option>
<option value="1986">1986</option>
<option value="1987">1987</option>
<option value="1988">1988</option>
<option value="1989">1989</option>
<option value="1990">1990</option>
<option value="1991">1991</option>
<option value="1992">1992</option>
<option value="1993">1993</option>
<option value="1994">1994</option>
<option value="1995">1995</option>
<option value="1996">1996</option>
<option value="1997">1997</option>
<option value="1998">1998</option>
<option value="1999">1999</option>
<option value="2000">2000</option>
<option value="2001">2001</option>
<option value="2002">2002</option>
<option value="2003">2003</option>
<option value="2004">2004</option>
<option value="2005">2005</option>
<option value="2006">2006</option>
<option value="2007">2007</option>
</select>
<span class="style9">*</span></font></td>
</tr>
<tr>
<td height="24" align="right" valign="middle" bgcolor="#000000" class="style3"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Pa&iacute;s:</font></td>
<td valign="middle" bgcolor="#CCCCCC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<label for="label7"></label>
<input name="pais" type="text" id="label7" size="30" maxlength="150" />
<span class="style9">*</span></font></td>
</tr>
<tr>
<td height="24" align="right" valign="middle" bgcolor="#000000" class="style3"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Estado:</font></td>
<td valign="middle" bgcolor="#CCCCCC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<label for="label8"></label>
<input name="estado" type="text" id="label8" size="30" maxlength="150" />
<span class="style9">*</span></font></td>
</tr>
<tr>
<td height="24" align="right" valign="middle" bgcolor="#000000" class="style3"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Cidade:</font></td>
<td valign="middle" bgcolor="#CCCCCC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<label for="label9"></label>
<input name="cidade" type="text" id="label9" size="30" maxlength="150" />
<span class="style9">*</span></font></td>
</tr>
<tr>
<td height="24" align="right" valign="middle" bgcolor="#000000" class="style3"><p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">CEP:</font></p></td>
<td valign="middle" bgcolor="#CCCCCC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<label for="label10"></label>
<input name="cep" type="text" id="label10" size="20" maxlength="50" />
<span class="style9">*</span></font></td>
</tr>
<tr>
<td height="24" colspan="2" align="center" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><span class="style2">No
campo da pergunta secreta n&atilde;o coloque o ponto de interga&ccedil;&atilde;o
(?) !</span> </font></td>
</tr>
<tr>
<td height="24" align="right" valign="middle" bgcolor="#000000" class="style3"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Pergunta
secreta: </font></td>
<td valign="middle" bgcolor="#CCCCCC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<label for="label11"></label>
<input name="pergunta" type="text" id="label11" size="40" maxlength="200" />
?<span class="style9">*</span></font></td>
</tr>
<tr>
<td height="24" align="right" valign="middle" bgcolor="#000000" class="style3"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Resposta
secreta: </font></td>
<td valign="middle" bgcolor="#CCCCCC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<label for="label12"></label>
<input name="resposta" type="text" id="label12" size="40" maxlength="200" />
<span class="style9">*</span></font></td>
</tr>
</table></td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="24">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td colspan="2" valign="top"><label for="Submit"></label> <input type="submit" name="cadastrar" value="Cadastrar" id="cadastrar" /></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td colspan="2" valign="top"><label for="label13"></label> <input type="reset" name="limpar" value="Limpar dados" id="label13" /></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="17"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</form>
</body>
</html>

Crea tu propio proyecto

¿Buscas un freelancer para realizar un proyecto similar? Crea tu propio proyecto y recibirás ofertas de los mejores freelancers.

Crear un proyecto similar

Cliente:

Diego O.
(Promedio 5.00 de 5)
Ubicación: Brasil
Método de pago: Verificado
Para ver más detalles del cliente, ingresa a Workana.
Cargando...