Re: PHP Form (aka:Re: [PHP] Can any one spot the Parse error Here)

From: Date: Tue, 03 Jul 2001 00:25:37 +0000
Subject: Re: PHP Form (aka:Re: [PHP] Can any one spot the Parse error Here)
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-55914@lists.php.net to get a copy of this message
> 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

« previous php.general (#55914) next »