problems with php_track_vars. please help
| From: | juanma cola | Date: | Tue, 22 May 2001 13:11:38 +0000 |
| Subject: | problems with php_track_vars. please help | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-56267@lists.php.net to get a copy of this message | ||
I have the following code in two files:
First file:
<center><H2>DELETE DOCUMENTS</H2>
<FORM NAME=formul METHOD=POST ACTION='deleteFunction.php'>
<TABLE NAME = fileTable border=5 cellspacing=3 cellpadding=3>
<TR><TD colspan=0></TD><TH></TH><TH>FILE NAME</TH></TR>
<?require ("commonftp.php");
echo "<br>";
$connId = ftpConnect();
$dir = ftp_pwd ($connId);
$list=Array();
$list=ftp_nlist($connId, "$dir");
$i=0;
$number = count($list);
for ($i = 0; $i < $number; $i++) {
$destinationFile = getFileName ($list[$i]);
echo "<TR><TD colspan=0></TD><TH>";?>
<INPUT TYPE=checkbox NAME=fileList VALUE='<?$destinationFile?>'>
<? printf ("</TH><TH>%s</TH>", $destinationFile);
/* echo $list[$i] . "<br>"; */
}
ftpDisconnect ($connId);
?>
</TABLE>
<INPUT TYPE=hidden NAME=func>
<p></p><INPUT TYPE=button NAME='delete' VALUE='DELETE'
onClick='func.value=1; submit();'>
<INPUT TYPE=button NAME='delete' VALUE='BACK' onClick='func.value=2;
submit();'></center>
</FORM>
Second file:
<?
"php_track_vars";
require ("commonftp.php");
switch ($func) {
case 1: $fileName = $HTTP_POST_VARS[$fileList];
echo $fileName;
$connId = ftpConnect();
ftpDisconnect($connId);
break;
case 2: header ("Location: initSeminary.php");
break;
}
?>
but in $HTTP_POST_VARS i don´t get the values of the check boxes
Here is the error.
Warning: Undefined variable: fileList in
e:\root\webapps\root\projektbueh\proyecto\deletefunction.php on line 18
Warning: Undefined index: in
e:\root\webapps\root\projektbueh\proyecto\deletefunction.php on line 18
Can someone help me, please?
gracias.
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.