Re: Form Problem

From: Date: Thu, 24 Jan 2002 08:49:32 +0000
Subject: Re: Form Problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-81970@lists.php.net to get a copy of this message
Here's a sidenote to the whole script: save your server a little load by removing the print statements. PHP is an embedded language; if you need to print something just break from PHP processing with a ?> tag and use standard HTML. You can embed <?= $variable ?> to print individual variables. If you are using the script to print chunks of code based on a condition, use: <? if ($var == value) { ?> <html code here> <? } else { ?> <other code here> <? }; ?> Something to that effect, at least. You get the idea. It makes code considerably more readable, and in the off-chance that someone who isn't a PHP programmer needs to make some aesthetic changes to the document, they can skip over the PHP input and just change HTML. Dropping the print statement means the server does less work, too. Mike Frazer "Jason Wong" <php-general@gremlins.com.hk> wrote in message news:php.general-81814@news.php.net... > On Thursday 24 January 2002 10:47, Michael P. Carel wrote: > > Hi there, > > > > I have a problem here regarding the form table name variable (i.e <input > > name=Process type text>), when i used Href tags to send the variable in the > > next script it does'nt recognized the $Process variable. I've tried the > > the submit type but but im having problem with other $variable in the table > > which is not part of the form. > > Here's the script: > > Correct me if I'm wrong, it seems like you're trying to set some values in a > form AND trying to pass values through the URL. You cannot do both at the > same time. Well actually you can if you use javascript. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > > /* > Recursion is the root of computation since it trades description for time. > */

« previous php.general (#81970) next »