Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

empty $_POST array

Status
Not open for further replies.

kusarigama

Technical User
Apr 24, 2002
45
0
0
DE
Oops - I forgot to put in the subject ...

Hi all,

I'm storing contents of a textfile in the array 'emails[]'
and try to output $_POST['emails'];
The array emails is empty and I don't know what I did wrong

Can anyone help me ?

$i=0;
while(!feof($fp))
{
$emails = fgets($fp,620)
<input type=checkbox name=emails[] value=$i>
$i++;
}

If(isset($_POST['send']))
{
for($i=0; !feof($fp); $i++)
{
$emails = fgets($fp,620);
if(in_array($i, $_POST['emails']))
print $emails;
}
}

Olli
 
Well I try a shot in the dark.... did you try HTTP_POST_VARS[&quot;send&quot;] instead?
Also I noticed you are using $_POST[&quot;send&quot;] first and then $_POST[&quot;email&quot;] later, look at that too.
I didn't have time to fully analyze your code - have to get coding myself now instead, sorry ;-)

Zodiak
 
Problem has been solved :). There where to much Form Tags in the script.

Olli
 
Are you talking about non-well-formed HTML or are you talking about reaching some limit of form fields that can be extracted?! That (2nd case) would be indeed very bad ;-(

Zodiak
 
I actually don't know how that happen. I had about 5 different forms in one script (add mail, delete mail, send to selected. All this as put in a layer). I suppose that was the bug ?


none well formed HTML;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top