Problem with form
| From: | Rodrigo de Oliveira Costa | Date: | Wed, 07 Jun 2006 05:14:36 +0000 |
| Subject: | Problem with form | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-237530@lists.php.net to get a copy of this message | ||
Guys I'm getting the following problem:
I have a form that asks for one variable that goes into the input box,
this box is named chapter, and the box is in a form that is submited
to another php, and this php should receive this variable and I should
be abble to access it thru $chapter, but when I try to use the
variable $chapter I get the following error:
Notice: Undefined variable: chapter in c:\arquivos de
programas\easyphp1-8\www\teste.php on line 6
This variable is concatenated into a string and is used to retrieve a
certain page from a domain, if I initialize the variable in the second
php script it goes ok, but if I try to use the one that should be
passed thru the form I get the error above. Does anybody know what I'm
doing wrong?
The second script is bellow so you can understand my problem thank you guys:
<?
//$chapter = 1;
$urlChapter = '/'.$chapter.'/';
$url = "http://www.domain.com/s/2784825"."$urlChapter";
$texto = file("$url");
$result2 = count($texto);
$i = 0;
while ($i < $result2)
{
echo "$texto[$i]";
$i++;
}
?>