ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Autofilled PHP Forms
Subject:   HTML parsing
Date:   2006-03-16 19:29:31
From:   GavinAndresen
Response to: HTML parsing

PHP's got several HTML parsers (I mention HTML_Sax in the article); I used regular expressions instead because:

1) All the full-blown HTML parsers have dependencies on other stuff, and the more dependencies the more pain for me (we deploy our code at LOTS of different ISPS, with lots of different PHP/Apache/IIS configurations).

2) The HTML parsers assume your form is HTML. We use Smarty templates instead of raw HTML, and I use the same code to populate the form with either Smarty template variables or values from $_REQUEST.

1 to 1 of 1
1 to 1 of 1