You are here: Re: conditional « PHP Language « IT news, forums, messages
Re: conditional

Posted by Geoff Berrow on 04/25/07 06:01

Message-ID: <F4mXh.3882$np4.998@bignews4.bellsouth.net> from Art
contained the following:

>Here's the full code: There is a little homegrown java and some java from a
>3rd party vendor in the code. The comment about bad code is no doubt what
>the problem is, I just don't see where the code is bad.

You have PHP echoing statements /before/ the <html> tag As well as all
the validation messages you have.

if ($holdchk == 0 ){
echo "<form method=\"POST\" action=\"something.php\">";
}
}
?>
<html>

later, you define the form action in the body

<form method="POST" action="thisform.php">

It should be something like

if ($holdchk == 0 ){
$form_tag= "<form method=\"POST\" action=\"something.php\">";
}


and then

....
<body>
<?php echo $form_tag;?>


There are many other errors, clumsy long winded design, deprecated code
etc. but the actual task is just a simple bit of validation. Rather
than try to fix all the errors, it may just be simpler to rewrite the
validation.
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация