[PHP-DB] Re: Undefined index and variables

2003-01-15 Thread Fred Wright
?
//This is lines 22 and 23 of Add.php
require(common.php) ;
GenerateHTMLForm();
$smt2= $_POST['Ref'];  //line 22
$smt3=$_POST['Chassis']; //line 23

The form below is in common.php

function GenerateHTMLForm() {

printf(FORM action=\add.php\ METHOD=post);

printf(TABLE border=\0\ width=\100%%\);

printf(TRTDReference:/TD);
printf(TDINPUT TYPE=text SIZE=5 NAME=Ref/TD/TR);

printf(TRTDChassis:/TD);
printf(TDINPUT TYPE=text SIZE=25 NAME=Chassis /TD/TR);
 printf(/TABLE);
 printf(INPUT TYPE=submit name=\submit\);
 printf(/FORM );
}

Fred Wright [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi to all
 Being new to PHP I am naturally experiencing some minor problems.

 I have a form which processes Ref and Chassis data, when I load Add.php
 which does work but on loading get errors

 Notice: Undefined index: Ref in C:\Xitami\webpages\add.php on line 22
 Notice: Undefined index: Chassis in C:\Xitami\webpages\add.php on line 23
 How do I get rid of these undefined errors? Could anyone advise please.
 Regards
 Fred

 printf(FORM action=\add.php\ METHOD=post);

 printf(TABLE border=\0\ width=\100%%\);

 printf(TRTDReference:/TD);

 printf(TDINPUT TYPE=text SIZE=5 NAME=Ref /TD/TR);

 printf(TRTDChassis:/TD);
 printf(TDINPUT TYPE=text SIZE=25 NAME=Chassis /TD/TR);

 printf(/TABLE);

 printf(INPUT TYPE=submit name=\submit\);

 printf(/FORM );





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




RE: [PHP-DB] Re: Undefined index and variables

2003-01-15 Thread Hutchins, Richard
Fred,

I don't have much time today, but here is my initial assessment of what
might be going wrong with your page:

You display add.php which draws a form for data.
You submit that form to add.php (itself).
The form redraws inside the page.
You get errors when add.php looks for data in the $HTTP_POST_VARS array
because the page is fresh and that array is empty.

Problem is that there is no code to handle the data that was entered in the
first place. Once you hit submit, the add.php page is (re)drawn in its
original state - with no values in the fields. Therefore, when the
$_POST['varname'] statement looks in $HTTP_POST_VARS, there's nothing to
display so you get the Undefined Index errors. It's almost like refreshing
the page.

My advice would be to separate the code for the data entry and data handling
parts of your project into independent scripts. Use add.php to collect the
data then send the data to a php script called handleAdd.php that gets the
name/value pairs and submits them to the database. After submitting the data
to the database in handleAdd.php, forward the user back to another page
(add.php again, if you want) where they can get some kind of confirmation
the data was entered.

A further recommendation would be to provide the list with the code you gave
to me so maybe somebody else with a little more free time might be able to
assist you further. Sorry I couldn't provide any more help.

Rich

 -Original Message-
 From: Fred Wright [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 15, 2003 12:21 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Re: Undefined index and variables
 
 
 ?
 //This is lines 22 and 23 of Add.php
 require(common.php) ;
 GenerateHTMLForm();
 $smt2= $_POST['Ref'];  //line 22
 $smt3=$_POST['Chassis']; //line 23
 
 The form below is in common.php
 
 function GenerateHTMLForm() {
 
 printf(FORM action=\add.php\ METHOD=post);
 
 printf(TABLE border=\0\ width=\100%%\);
 
 printf(TRTDReference:/TD);
 printf(TDINPUT TYPE=text SIZE=5 NAME=Ref/TD/TR);
 
 printf(TRTDChassis:/TD);
 printf(TDINPUT TYPE=text SIZE=25 NAME=Chassis /TD/TR);
  printf(/TABLE);
  printf(INPUT TYPE=submit name=\submit\);
  printf(/FORM );
 }
 
 Fred Wright [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi to all
  Being new to PHP I am naturally experiencing some minor problems.
 
  I have a form which processes Ref and Chassis data, when I 
 load Add.php
  which does work but on loading get errors
 
  Notice: Undefined index: Ref in C:\Xitami\webpages\add.php 
 on line 22
  Notice: Undefined index: Chassis in 
 C:\Xitami\webpages\add.php on line 23
  How do I get rid of these undefined errors? Could anyone 
 advise please.
  Regards
  Fred
 
  printf(FORM action=\add.php\ METHOD=post);
 
  printf(TABLE border=\0\ width=\100%%\);
 
  printf(TRTDReference:/TD);
 
  printf(TDINPUT TYPE=text SIZE=5 NAME=Ref /TD/TR);
 
  printf(TRTDChassis:/TD);
  printf(TDINPUT TYPE=text SIZE=25 NAME=Chassis /TD/TR);
 
  printf(/TABLE);
 
  printf(INPUT TYPE=submit name=\submit\);
 
  printf(/FORM );
 
 
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




[PHP-DB] Re: Undefined index and variables

2003-01-15 Thread Fred Wright
here are the files to make add.php work. thanks to Richard Hutchins for his
answer, that I do not yet understand:-)

Fred Wright [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi to all
 Being new to PHP I am naturally experiencing some minor problems.

 I have a form which processes Ref and Chassis data, when I load Add.php
 which does work but on loading get errors

 Notice: Undefined index: Ref in C:\Xitami\webpages\add.php on line 22
 Notice: Undefined index: Chassis in C:\Xitami\webpages\add.php on line 23
 How do I get rid of these undefined errors? Could anyone advise please.
 Regards
 Fred

 printf(FORM action=\add.php\ METHOD=post);

 printf(TABLE border=\0\ width=\100%%\);

 printf(TRTDReference:/TD);

 printf(TDINPUT TYPE=text SIZE=5 NAME=Ref /TD/TR);

 printf(TRTDChassis:/TD);
 printf(TDINPUT TYPE=text SIZE=25 NAME=Chassis /TD/TR);

 printf(/TABLE);

 printf(INPUT TYPE=submit name=\submit\);

 printf(/FORM );




begin 666 Fred.zip
M4$L#!!0(`-L)+RX=#XSLUP0``!$-```'861D+G!H+57;6_B.!#^
M?$C\A[DHO08IVI! 2G057?+WE;JFPJWI^JZJDQB(-J04-NHRU7][S.8Z$
M:^_34:D\FQS-CCT.]-OQ8KWDB:(/Z^6Z7JO7'WQ(PZUB+)9B3ATFXU
M8/*;/5*DO_A9AGF2@FH/EWFE)!/TZO;SX2DE$F0/6Z=D97(W_A/'5]/;N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FZKJZ''!;SLXL/-[\1]::LR :3
MLBV%(_%IY%DX-]IQ;XF#N-D)+*MYF.Q:209^/=9Z\2D$/Q+*)KQ'4(YU 
M/((_EC#;4S0**RM#V23$4\1% 02=A K!3WL-;+R0@TDK6*_BA;#R'#09
MC\1]QPJ+H.(Y/O9QN\2U)DH1:DE\$M22)+ Y4TL2:R^-)//W]^E78DF$
MHZF(9QH-A$Y3$4D8\SBA1*B(96Z)-1(Y3$G8,VTBI**2,:F:A.1]ZF(
M9.RZ-A$Y344D8UNVBA9*B(9^[9-1#ZD*VA9[N-)6T_'9LK=]+NGJ:^;F
M.7A6V8P[EXZ^BX@3\4ST51$7N3`J-2\+1.)SC-WT_--7=F,YI:[
MV45KU[;:\\ZYRYLK?$;W;17-J)H/UYVP_,.V+0-]ASK83]\()]JV:$M*NT
M88G,:9O1E!R_Y/VYVD//ETCF:P;9B J$_^7_@G!8PQ33P#1T+_B8@#Z;
MH??D8(Y MRSY6N-/W37I$P8!NBOW7+'=-[:W\(G#WDQ]8[@K[] GAU+'0!+
MNZ4Y4E;]2-4`HTCDUFKVZJVXC.W4=_EQ9EV8/I%3%4_BY=V[[:UWX+Y

RE: [PHP-DB] Re: Undefined index and variables

2003-01-15 Thread Ben Joyce
Couldn't you use the 'for each' method on $_POST instead?

 .b

 -Original Message-
 From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] 
 Sent: 15 January 2003 16:44
 To: 'Fred Wright'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Re: Undefined index and variables
 
 
 Fred,
 
 I don't have much time today, but here is my initial 
 assessment of what might be going wrong with your page:
 
 You display add.php which draws a form for data.
 You submit that form to add.php (itself).
 The form redraws inside the page.
 You get errors when add.php looks for data in the 
 $HTTP_POST_VARS array because the page is fresh and that 
 array is empty.
 
 Problem is that there is no code to handle the data that was 
 entered in the first place. Once you hit submit, the add.php 
 page is (re)drawn in its original state - with no values in 
 the fields. Therefore, when the $_POST['varname'] statement 
 looks in $HTTP_POST_VARS, there's nothing to display so you 
 get the Undefined Index errors. It's almost like refreshing the page.
 
 My advice would be to separate the code for the data entry 
 and data handling parts of your project into independent 
 scripts. Use add.php to collect the data then send the data 
 to a php script called handleAdd.php that gets the name/value 
 pairs and submits them to the database. After submitting the 
 data to the database in handleAdd.php, forward the user back 
 to another page (add.php again, if you want) where they can 
 get some kind of confirmation the data was entered.
 
 A further recommendation would be to provide the list with 
 the code you gave to me so maybe somebody else with a little 
 more free time might be able to assist you further. Sorry I 
 couldn't provide any more help.
 
 Rich
 
  -Original Message-
  From: Fred Wright [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, January 15, 2003 12:21 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] Re: Undefined index and variables
  
  
  ?
  //This is lines 22 and 23 of Add.php
  require(common.php) ;
  GenerateHTMLForm();
  $smt2= $_POST['Ref'];  //line 22
  $smt3=$_POST['Chassis']; //line 23
  
  The form below is in common.php
  
  function GenerateHTMLForm() {
  
  printf(FORM action=\add.php\ METHOD=post);
  
  printf(TABLE border=\0\ width=\100%%\);
  
  printf(TRTDReference:/TD);
  printf(TDINPUT TYPE=text SIZE=5 NAME=Ref/TD/TR);
  
  printf(TRTDChassis:/TD);
  printf(TDINPUT TYPE=text SIZE=25 NAME=Chassis /TD/TR);  
  printf(/TABLE);  printf(INPUT TYPE=submit name=\submit\);
   printf(/FORM );
  }
  
  Fred Wright [EMAIL PROTECTED] wrote in message 
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   Hi to all
   Being new to PHP I am naturally experiencing some minor problems.
  
   I have a form which processes Ref and Chassis data, when I
  load Add.php
   which does work but on loading get errors
  
   Notice: Undefined index: Ref in C:\Xitami\webpages\add.php
  on line 22
   Notice: Undefined index: Chassis in
  C:\Xitami\webpages\add.php on line 23
   How do I get rid of these undefined errors? Could anyone
  advise please.
   Regards
   Fred
  
   printf(FORM action=\add.php\ METHOD=post);
  
   printf(TABLE border=\0\ width=\100%%\);
  
   printf(TRTDReference:/TD);
  
   printf(TDINPUT TYPE=text SIZE=5 NAME=Ref /TD/TR);
  
   printf(TRTDChassis:/TD);
   printf(TDINPUT TYPE=text SIZE=25 NAME=Chassis /TD/TR);
  
   printf(/TABLE);
  
   printf(INPUT TYPE=submit name=\submit\);
  
   printf(/FORM );
  
  
  
  
  
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




Re: [PHP-DB] Re: Undefined index and variables

2003-01-15 Thread Fred Wright
Of course, but that would solve the problem I have, albeit it would look
more elegant. Have tried everything except the solution which I cannot find,
see the zip file earlier up the list from Fred Wright

Ben Joyce [EMAIL PROTECTED] wrote in message
DF1220D4F915D4119C6B00306E00103E0252EDB7@IDS10004">news:DF1220D4F915D4119C6B00306E00103E0252EDB7@IDS10004...
 Couldn't you use the 'for each' method on $_POST instead?

  .b

  -Original Message-
  From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
  Sent: 15 January 2003 16:44
  To: 'Fred Wright'; [EMAIL PROTECTED]
  Subject: RE: [PHP-DB] Re: Undefined index and variables
 
 
  Fred,
 
  I don't have much time today, but here is my initial
  assessment of what might be going wrong with your page:
 
  You display add.php which draws a form for data.
  You submit that form to add.php (itself).
  The form redraws inside the page.
  You get errors when add.php looks for data in the
  $HTTP_POST_VARS array because the page is fresh and that
  array is empty.
 
  Problem is that there is no code to handle the data that was
  entered in the first place. Once you hit submit, the add.php
  page is (re)drawn in its original state - with no values in
  the fields. Therefore, when the $_POST['varname'] statement
  looks in $HTTP_POST_VARS, there's nothing to display so you
  get the Undefined Index errors. It's almost like refreshing the page.
 
  My advice would be to separate the code for the data entry
  and data handling parts of your project into independent
  scripts. Use add.php to collect the data then send the data
  to a php script called handleAdd.php that gets the name/value
  pairs and submits them to the database. After submitting the
  data to the database in handleAdd.php, forward the user back
  to another page (add.php again, if you want) where they can
  get some kind of confirmation the data was entered.
 
  A further recommendation would be to provide the list with
  the code you gave to me so maybe somebody else with a little
  more free time might be able to assist you further. Sorry I
  couldn't provide any more help.
 
  Rich
 
   -Original Message-
   From: Fred Wright [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, January 15, 2003 12:21 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP-DB] Re: Undefined index and variables
  
  
   ?
   //This is lines 22 and 23 of Add.php
   require(common.php) ;
   GenerateHTMLForm();
   $smt2= $_POST['Ref'];  //line 22
   $smt3=$_POST['Chassis']; //line 23
  
   The form below is in common.php
  
   function GenerateHTMLForm() {
  
   printf(FORM action=\add.php\ METHOD=post);
  
   printf(TABLE border=\0\ width=\100%%\);
  
   printf(TRTDReference:/TD);
   printf(TDINPUT TYPE=text SIZE=5 NAME=Ref/TD/TR);
  
   printf(TRTDChassis:/TD);
   printf(TDINPUT TYPE=text SIZE=25 NAME=Chassis /TD/TR);
   printf(/TABLE);  printf(INPUT TYPE=submit name=\submit\);
printf(/FORM );
   }
  
   Fred Wright [EMAIL PROTECTED] wrote in message
   [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi to all
Being new to PHP I am naturally experiencing some minor problems.
   
I have a form which processes Ref and Chassis data, when I
   load Add.php
which does work but on loading get errors
   
Notice: Undefined index: Ref in C:\Xitami\webpages\add.php
   on line 22
Notice: Undefined index: Chassis in
   C:\Xitami\webpages\add.php on line 23
How do I get rid of these undefined errors? Could anyone
   advise please.
Regards
Fred
   
printf(FORM action=\add.php\ METHOD=post);
   
printf(TABLE border=\0\ width=\100%%\);
   
printf(TRTDReference:/TD);
   
printf(TDINPUT TYPE=text SIZE=5 NAME=Ref /TD/TR);
   
printf(TRTDChassis:/TD);
printf(TDINPUT TYPE=text SIZE=25 NAME=Chassis /TD/TR);
   
printf(/TABLE);
   
printf(INPUT TYPE=submit name=\submit\);
   
printf(/FORM );
   
   
  
  
  
   --
   PHP Database Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 




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




[PHP-DB] Re: Undefined index and variables

2003-01-15 Thread Fred Wright
Problem solved with
//Init variables
$HTTP_POST_VARS['Ref']=A;
etc
Thanks guys for your help
:-))

Fred Wright [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi to all
 Being new to PHP I am naturally experiencing some minor problems.

 I have a form which processes Ref and Chassis data, when I load Add.php
 which does work but on loading get errors

 Notice: Undefined index: Ref in C:\Xitami\webpages\add.php on line 22
 Notice: Undefined index: Chassis in C:\Xitami\webpages\add.php on line 23
 How do I get rid of these undefined errors? Could anyone advise please.
 Regards
 Fred

 printf(FORM action=\add.php\ METHOD=post);

 printf(TABLE border=\0\ width=\100%%\);

 printf(TRTDReference:/TD);

 printf(TDINPUT TYPE=text SIZE=5 NAME=Ref /TD/TR);

 printf(TRTDChassis:/TD);
 printf(TDINPUT TYPE=text SIZE=25 NAME=Chassis /TD/TR);

 printf(/TABLE);

 printf(INPUT TYPE=submit name=\submit\);

 printf(/FORM );





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