It's hard without some context, but I'm guessing that you should be 
looking for your post results in the global $_POST variable, but you're not.

Example:

You've got a form, with an element called "item":
<form method='POST' action='target_url.php'>
<input type='text' name='item'>
<input type='submit' value='Go &gt;&gt;'>

On your target page, the value from the form is going to be in the 
$_POST array.

example:
echo $_POST['item'];

Also, if you need to post an array of data via a form, you can have 
multiple elements with the same name.
This is commonly used for checkboxes, where you can have multiple 
specified values for one field:

<form method='POST' action='target_url.php'>
<input type='checkbox' name='colors[]' value='red'>
<input type='checkbox' name='colors[]' value='blue'>
<input type='checkbox' name='colors[]' value='green'>
</form>

The '[]' at the end of the name tells PHP to compile all the values into 
an array for you.

Then, you could do:

foreach($_POST['colors'] AS $color) {
    echo $color . ",";
}

Hope that helps,
Jeromie

>Hello
>I have this problem that seems at the surface dead
>easy .., yet ive been struggling with it for a couple
>of days
>
>Id like to give users the option of saving selected
>data by clicking on a button. When this is done, the
>same rows would be displayed but this time with
>comma-separated values, and nothing else. No graphics
>or other options/buttons on the screen. Then a user
>would simply save the page as text or html.
>
>What I have been trying to do without success, is to
>post the array in a hidden field to another page.  And
>then try :
>foreach ($array as $value){
>
>etc..}
>
>But for some reason that has not worked for me.  I
>keep gettin the error :
>Warning: Invalid argument supplied for foreach() ..
>
>Your suggestions are greatly appreciated,
>
>David
>
>
>       
>       
>               
>___________________________________________________________ 
>Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail 
>http://uk.messenger.yahoo.com
>
>
>The php_mysql group is dedicated to learn more about the PHP/MySQL web 
>database possibilities through group learning.  
>Yahoo! Groups Links
>
>
>
> 
>
>
>  
>



The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to