[PHP] Variable not passing to second page

2002-07-08 Thread Terry Cheung

I 've just setup the Apache 1.3.26 with PHP 4.2.1. When I use back the old
php script files. They can display successfully,  but whei I submit the
data, they cannot pass to the second page even they can be shown in the URL
with get method. here is one of my script


jobapp.php
HTML
!-- jobapp.php--
 BODY

 ?php
  require(common.php)
 ?
 H1?php echo (COMPANY); ? jobs application form/H1
 PAre you finding a challenging career in the bicycle world?
Still waiting for what?/P
 FORM NAME='frmJobApp' METHOD= get ACTION=jobapp_action.php
 Please Enter Your Name Here(Required):
 INPUT NAME=applicant TYPE=textBR
 Please enter your phone number:
 INPUT NAME=phone TYPE=textBR
 Please enter your E-mail address(Required):
 INPUT NAME=email TYPE=textBR

 Please choos the Department:
 SELECT NAME=position
  OPTION VALUE=aAccount/OPTION
  OPTION VALUE=bRepairing/OPTION
  OPTION VALUE=hHuman Resources/OPTION
  OPTION VALUE=mMarketing/OPTION
  OPTION VALUE=sSercices/OPTION
 /SELECTBR

 Please choose your working place:
 SELECT NAME=country
  OPTION VALUE=ca¢D[R3?j/OPTION
  OPTION VALUE=cn??¢Xe/OPTION
  OPTION VALUE-cr-o-U?n¡LE/OPTION
  OPTION VALUE=tw¢DxAW/OPTION
  OPTION VALUE=us?u¢Xe/OPTION
 /SELECTBR

 INPUT NAME=avail TYPE=checkbox¢Ds¡Le?W¡ÂZBR
 INPUT NAME=enter TYPE=submit VALUE=Enter
 /FORM
 /BODY
/HTML


jobapp_action.php
HTML
!jobapp_action.php--
 BODY

 ?php
  require(common.php);

  $submit=1;
  if (!$applicant){
   $submit=0;
   $applicant = BInvalid Name/B;
   }
  if (!check_email($email)) {
   $submit = 0;
   $email =BInvalid Email/B;
   }

  echo(BFollowing is your information:/B.
   NL.NL.
   Name: $applicant.NL.
   TEL: $phone.NL.
   E-Mail: $email. NL.
   Country:  );

   switch ($country) {
   case ca:
echo(Canada);
break;
   case cn :
echo(China);
break;
   case cr :
echo (Crostirica);
break;
   case tw :
echo (Taiwan);
break;
   default :
echo (USA);
   }

   echo (NL. Working Department: );

   switch ($position) {

   case a:
   echo (Accounting);
   break;
   case b:
   echo (Reparing);
   break;
   case h:
   echo (Human Resources);
   break;
   case m :
   echo (Marketing);
   break;
   default :
   echo (Services);
   }
   echo (NL);

   $avail=isset($avail);

  echo(¢Ds¡Le?W¡ÂZ: . ($avail ? ¢Di¢DH: ?¢G¡Âa));
  ?

  FORM method=post
   INPUT TYPE=submit VALUE=Submit
   INPUT TYPE=button VALUE=|^?W?@-? onclick=self.history.back()
  /FORM
 /BODY
/HTML








-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Variable not passing to second page

2002-07-08 Thread Philip Olson

Please don't repeat your questions, see the 
other post for details.  In short, it has to 
do with register_globals directive in php.ini

Regards,
Philip Olson


On Tue, 9 Jul 2002, Terry Cheung wrote:

 I 've just setup the Apache 1.3.26 with PHP 4.2.1. When I use back the old
 php script files. They can display successfully,  but whei I submit the
 data, they cannot pass to the second page even they can be shown in the URL
 with get method. here is one of my script
 
 
 jobapp.php
 HTML
 !-- jobapp.php--
  BODY
 
  ?php
   require(common.php)
  ?
  H1?php echo (COMPANY); ? jobs application form/H1
  PAre you finding a challenging career in the bicycle world?
 Still waiting for what?/P
  FORM NAME='frmJobApp' METHOD= get ACTION=jobapp_action.php
  Please Enter Your Name Here(Required):
  INPUT NAME=applicant TYPE=textBR
  Please enter your phone number:
  INPUT NAME=phone TYPE=textBR
  Please enter your E-mail address(Required):
  INPUT NAME=email TYPE=textBR
 
  Please choos the Department:
  SELECT NAME=position
   OPTION VALUE=aAccount/OPTION
   OPTION VALUE=bRepairing/OPTION
   OPTION VALUE=hHuman Resources/OPTION
   OPTION VALUE=mMarketing/OPTION
   OPTION VALUE=sSercices/OPTION
  /SELECTBR
 
  Please choose your working place:
  SELECT NAME=country
   OPTION VALUE=ca¢D[R3?j/OPTION
   OPTION VALUE=cn??¢Xe/OPTION
   OPTION VALUE-cr-o-U?n¡LE/OPTION
   OPTION VALUE=tw¢DxAW/OPTION
   OPTION VALUE=us?u¢Xe/OPTION
  /SELECTBR
 
  INPUT NAME=avail TYPE=checkbox¢Ds¡Le?W¡ÂZBR
  INPUT NAME=enter TYPE=submit VALUE=Enter
  /FORM
  /BODY
 /HTML
 
 
 jobapp_action.php
 HTML
 !jobapp_action.php--
  BODY
 
  ?php
   require(common.php);
 
   $submit=1;
   if (!$applicant){
$submit=0;
$applicant = BInvalid Name/B;
}
   if (!check_email($email)) {
$submit = 0;
$email =BInvalid Email/B;
}
 
   echo(BFollowing is your information:/B.
NL.NL.
Name: $applicant.NL.
TEL: $phone.NL.
E-Mail: $email. NL.
Country:  );
 
switch ($country) {
case ca:
 echo(Canada);
 break;
case cn :
 echo(China);
 break;
case cr :
 echo (Crostirica);
 break;
case tw :
 echo (Taiwan);
 break;
default :
 echo (USA);
}
 
echo (NL. Working Department: );
 
switch ($position) {
 
case a:
echo (Accounting);
break;
case b:
echo (Reparing);
break;
case h:
echo (Human Resources);
break;
case m :
echo (Marketing);
break;
default :
echo (Services);
}
echo (NL);
 
$avail=isset($avail);
 
   echo(¢Ds¡Le?W¡ÂZ: . ($avail ? ¢Di¢DH: ?¢G¡Âa));
   ?
 
   FORM method=post
INPUT TYPE=submit VALUE=Submit
INPUT TYPE=button VALUE=|^?W?@-? onclick=self.history.back()
   /FORM
  /BODY
 /HTML
 
 
 
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Variable not passing to second page

2002-07-08 Thread Analysis Solutions

Hi Terry:

See the answer to the other thread you already started on this subject.  
In short, use the superglobal's to access the input: 
$_POST['variablename']

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php