Hi everyone,

A quick question about html tags and PHP.  I have a text area where users
can submit text, and I need them to able to have links in the text if they
so choose.

The contents get written to an ini style flat file database.

The problem comes when I try to print that content back out from the file -
I get a warning from the parse_ini_file() function:

Warning: Error parsing ./data/events on line 9 in Unknown on line 0

Line 9 happens to be the line in the events file that contains the <a href>
tag.  I have tried to do a base64_encode() on the data from the text area,
and then wrote it to the ini file encapsulated in double quotes.  It still
fails when I do the base64_decode(), except then I get nothing printed back
to the browser.  Any ideas?

-Erich-

===========CODE============
// Get the form variables
 $month = $_REQUEST['month'];
 $day = $_REQUEST['day'];
 $year = $_REQUEST['year'];
 $time = $_REQUEST['time'];
 $bands = $_REQUEST['bands'];
 $venue = $_REQUEST['venue'];
 $description = base64_encode($_REQUEST['description']);

list_events()
{
$ALLEVENTS = parse_ini_file('./data/events', TRUE);
while (list ($key, $value) = each ($ALLEVENTS))
 {
  print '<br>';
  print '<table border=0 cellpadding=0 cellspacing=0 width="100%">
       <tr>
        <td bgcolor="#AAAAAA" align="left">
         <font color="black" size=2>
          Saje, Live at '.stripslashes($value['venue']).
         '</font>
        </td>
        <td bgcolor="#AAAAAA" align="right">
         <font color="black" size=2>'.
         $value['month'].'/'.$value['day'].'/'.$value['year'].'</font>
        </td>
       </tr>
       <tr>
        <td colspan=2>
         <font color="#efa68a">With:
'.stripslashes($value['bands']).'</font><br>
         <br><font color="white">'.base64_decode($value['description']).
        '</font></td>
       </tr>
      </table>';
}


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

Reply via email to