..:: MX Studio Fóruns ::..: variaveis - ..:: MX Studio Fóruns ::..

Jump to content

Publicidade




ATENÇÃO

Para evitar posts desnecessários e que não influam para o andamento e desenvolvimento do fórum, clique aqui e leia todas as regras.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

variaveis não consigo carregar variaveis

#1 User is offline   drax 

  • Group: Membros
  • Posts: 3
  • Joined: 19-October 06

  Posted 25 October 2006 - 01:55 AM

bom dia pessoal

estou com um problema no seguinte código:
quando executo o código jobapp_action.php ele não consegue carregar a variavel do phone e os combobox não mostram as opcões escolhidas mostram só sales e united states sendo que no livro elas estão como padrão ( não entendi)( livro programando php- a biblia) .
alguem pode me ajudar?




<html>
<!--jobapp1.php-->
<body>
<?php
require("common.php");
?>
<h1><?php echo (COMPANY);?> wagner form</h1>

<p> are you looking for an exciting career in the world of cycling?
look no further!
</p>
<FORM NAME='frmjobapp' METHOD=post ACTION="jobapp_action.php">
Please enter your name :
<INPUT NAME="cliente" TYPE="text"><br>
Please enter your telephone number :
<INPUT NAME="phone" TYPE="text"><br>
Please enter your email address :
<INPUT NAME="email" TYPE="text"><br>

Please select the type of position in which you are interested :
<SELECT NAME="position">
<OPTION VALUE="a">Accounting</OPTION>
<OPTION VALUE="b">Bicycle<OPTION>
<OPTION VALUE="h">Human resource<OPTION>
<OPTION VALUE="m">Management<OPTION>
<OPTION VALUE="s">Sales<OPTION>
</SELECT><br>

Please select the country in which you would like to work:
<SELECT NAME="country">
<OPTION VALUE="cn">Canada</OPTION>
<OPTION VALUE="cr">Costa Rica</OPTION>
<OPTION VALUE="de">Germany</OPTION>
<OPTION VALUE="uk">United Kingdow</OPTION>
<OPTION VALUE="us">United States</OPTION>
</SELECT><br>

<INPUT NAME="avail" TYPE="checkbox">Avaliable immediately<BR><BR>
<INPUT NAME="enter" TYPE="submit" VAlUE="Enter">
</form>
</body>
</html>
############################################################
<html>
<!--jobapp_action.php -->
<body>
<?php
$cliente = $_POST['cliente'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$ifrmjobapp = $_POST['frmjobapp'];

require ("common.php");

$submit= 1;//flag do botão submit
if(!$cliente){
$submit = 0;
$cliente = "<B>invalid Name</B>";
}
if (!check_email ($email)){
$submit = 0;
$email = "<B> invalid email Adress</B>";
}


echo ("<b>you have submit the following:<b>".
NL . NL . //constante de nova linha
"Name: $cliente". NL .
"phone: $phone" . NL .
"E-mail: $email" . NL .
"Country: ");

switch ($country){
case "ca":
echo ("canada");
break;
case "cr":
echo ("costa rica");
break;
case "de":
echo ("Germany");
break;
case "uk":
echo ("united kingdow");
break;
default://tem que ser "us"
echo ("united States");
}

echo (NL . "position: ");

switch ($position){
case "a";
echo ("Accounting");
break;
case "b";
echo ("Bicycle ");
break;
case "h";
echo ("human resource");
break;
case "m";
echo ("management");
break;
default:// tem que ser "s"
echo ("sales");
}
echo (NL);

//converte para boolean
$avail = isset($avail);
echo("Avaliable immediately:".($avail ? "yes" : "no"));
?>
<FORM METHOD=post>
<INPUT TYPE="submit" VALUE= "submit">
<INPUT TYPE= "button" VALUE= "Go Back" ONCLICK="self.history.back();">
</FORM>
</BODY>
</HTML>


</body>
</html>
obrigado.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic



Publicidade




1 User(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)