[thelist] Web site add on software

R.Livsey R.Livsey at cache-22.co.uk
Thu Jan 10 10:23:25 CST 2002


> <tip type="server-side elegance">
> 
> A few developers I know tend to multiply server-side pages 
> (like a submit form, say in submit.php, then a verification 
> form, say verif.php) and then have to maintain several 
> instances of the same code (in my example, the same form, 
> before and after being filled).
> 
> Always try to use the same file with methods to manipulate 
> the data, like so
> :
> submit.php submits data to submit.php?op=verify
> and so on.
> 
> </tip>

Free tip

<tip type="server-side elegance" language="php">

When you want a PHP page to submit a form to itself, instead of using
the file name in the action field, use $PHP_SELF.
This means that if you change the filename in the future, everything
still works without having to touch a line of code!

</tip>

R.Livsey

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/2002
 





More information about the thelist mailing list