> It's more of a pain if I have to remember what order the parameters go

Yeah, good point.  I can see that.  What i have been doing is componentising
the page into functions which are responsible for rendering a discrete
section of that page...ie if a page consists of a title bar and a form and
the form gets processed by that same page, which can print a response in
place of the form upon submission...


function renderTitle()
{
  echo "<table>";
  echo "...";
  echo "</table>";
}

function renderForm()
{
  echo "<form>";
  echo "...";
  echo "</form>";
}

function renderFormSubmitResponse()
{
  echo "<b>Thankyou!</b>";
}

Then all you have to do is put logic at the front of your code to determine
what 'page components' get rendered.  Also, this way you start to build up a
set of common functions, like ones to display query results in a table,
populate a form by creating dynamic Java Script etc etc

Just a thought on the way to do things, thassal, interesting to compare
techniques. It scares me as to how few people seem to worry about form these
days ...

AndrewH



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to