Re: Automatic Form processor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I am in need of a PHP script that will take any POST data and parse it into
> a file and email it out to users.  The data needs to be completely
> changeable, whether I have 20 items or 400, I just want to throw everything
> to the script via POST and let it take the POST information and manipulate
> it.
> 
> IE:
> 
> <form method="post" action="parse.php">
> <input type="text" name="question_1">
> <input type="text" name="question_2">
> <input type="text" name="question_3">
> <input type="text" name="question_4">
> <input type="text" name="question_5">
> ...
> <input type="text" name="question_69">
> <input type="text" name="question_70">
> 
> <input type="submit">
> 

You could use a foreach...

foreach ( $_POST as $key => $value )
{
   if ( substr( $key, 0, 4 ) == "quest" )
      echo "$value: $key\n";
}

-Dan Joseph

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux