Jump to content
Fórum Script Brasil
  • 0

não consigo imprimir variaveis



minhas variaveis não aparecem na outra pagina :wacko:


<FORM  action="Prog13.php" method="post"  >
email:<input type = "text" name = "nome" size = "30" Maxlength = "30"> <br>
endereço:<input type = "text" name = "endereco" size= "80" maxlength ="80"> <br>
<select size = "1" name = "estado">
<option value="UF" checked> UF </option>
<option value="AC"> AC </option>
<option value="AL"> AL </option>
<option value="AM"> AM </option>
<option value="AP"> AP </option>
<option value="BA"> BA </option>
<option value="CE"> CE </option>
<option value="DF"> DF </option>
<option value="ES"> ES </option>
<option value="GO"> GO </option>
<option value="MA"> MA </option>
<option value="MG"> MG </option>
<option value="MS"> MS </option>
<option value="MT"> MT </option>
<option value="PA"> PA </option>
<option value="PB"> PB </option>
<option value="PE"> PE </option>
<option value="PI"> PI </option>
<option value="PR"> PR </option>
<option value="RJ"> RJ </option>
<option value="RN"> RN </option>
<option value="RS"> RS </option>
<option value="RR"> RR </option>
<option value="RO"> RO </option>
<option value="RN"> RN </option>
<option value="SC"> SC </option>
<option value="SE"> SE </option>
<option value="SP"> SP </option>
<option value="TO"> TO </option>
sexo: <br>
<input type="Radio" name="sexo" value = "Masculino"  > Masculino 
<input type="Radio" name="sexo" value = "Feminino"> Feminino <br>

<select size = "1" name = "profissao">
<option value="programador"> programador </option>
<option value="designer"> Designer </option>
<option value="engenheiro"> engenheiro </option>
<option value="médico"> médico </option>

<input type ="submit" value = "enviar">
<input type ="reset" value = "limpar">

$nome = $_POST["nome"];
$endereco =$_POST["endereco"];
$estado =$_POST["estado"];
$sexo =$_POST["sexo"];
$profissao =$_POST["profissao"];
$opt1 =$_POST["opt1"];
$opt2 =$_POST["opt2"];
$opt3 =$_POST["opt3"];
$opt4 =$_POST["opt4"];
$opt5 =$_POST["opt5"];
Nome: -------------- <?=$nome?><br>
Endereço: ---------- <?=$endereco?><br>
Estado: -------------<?=$estado?><br>
Sexo: ===============<?=$sexo?><br>
profissão: ===============<?=$profissao?><br>


me ajudem ai fazendo um favor...

Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0



      function g($a)
        return (isset($_POST[$a])) ? $_POST[$a] : "";
 $nome = g("nome");
 $endereco = g("endereco");
 $estado = g("estado");
 $sexo = g("sexo");
 $profissao = g("profissao");
 $opt1 = g("opt1");
 $opt2 = g("opt2");
 $opt3 = g("opt3");
 $opt4 = g("opt4");
 $opt5 = g("opt5");
 Nome: -------------- <?echo '= '$nome;?><br>
 Endereço: ---------- <?echo '= '$endereco;?><br>
 Estado: -------------<?echo '= '$estado;?><br>
 Sexo: ===============<?echo '= '$sexo;?><br>
 profissão: ===============<?echo '= '$profissao;?><br>


Espero ter ajudado.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Cloud Computing

  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...