RE: [PHP] Converting piped data to values from html to phpcgi

2006-02-13 Thread Ford, Mike
On 13 February 2006 14:38, zedleon wrote: > I am using php as a cgi. The data from my html is piped through stdin > using this code: > $fp=popen("cat","r"); > $str=fgets($fp); > print $str; > > > > The result I am getting looks like this: (which is correct) > sender_name=zedleon&[EMAIL PROTECTE

Re: [PHP] Converting piped data to values from html to phpcgi

2006-02-13 Thread Jochem Maas
also check out these 2 funcs: http://php.net/parse_str http://php.net/parse_url Dan Parry wrote: This works for me: $temp = 'sender_name=zedleon&[EMAIL PROTECTED]& sender_msg=This+is+a+test&Submit=Submit'; $arr = array(); foreach (explode('&', $temp) as $v) { $split = explode('=', $v)

RE: [PHP] Converting piped data to values from html to phpcgi

2006-02-13 Thread Dan Parry
This works for me: ' . $arr['sender_name']; ?> That routine should create variables with the names of the arguments as well as an associative array of the string HTH Dan -Original Message- From: zedleon [mailto:[EMAIL PROTECTED] Sent: 13 February 2006 14:38 To: php-general@lists.php.n