|
Posted by Schraalhans Keukenmeester on 04/10/07 22:15
Jerim79 wrote:
> Here it is:
>
> <?php
>
> if($_SERVER['REQUEST_METHOD']=='POST'){
>
[snip]
> If you know of a way to make the current code work, or if you have a
> better idea of how to do this from top to bottom, please let me know.
> I would like to also be able to carry over the user's selections, so
> that they don't have to recheck each box, if they only left off one.
I don't mean to offend you or discourage you from working with PHP, but:
The way you coded the posted script gives me the impression you haven't
yet grasped and practiced with the basic building blocks of PHP or maybe
even programming in general. (See Rami's comments)
Reworking your huge script into something concise, correct and 'a common
sense coding practise' would probably result in a script hardly
comparable to yours, rendering it mostly useless as a learning
possibility. Commenting/correcting on a line by line basis would require
a post a mile longer than your is already.
If all you really want is a fix for a specific detail, give us only that
and leave out the rest.
Personally I think you may be helped more by leaving this spaghetti for
later, and start getting to grips with PHP's building blocks first. Get
a good (e-)book or tutorial site and begin with short examples and
experiments that help you understand the concepts and PHP's way of doing
things. I know they say PHP has a short learning curve, and compared to
some/many other languages it probably does, but trying to sail even the
simplest boat before you know bow from stern is not advisable.
If I am completely off the mark here, I'm sorry. I just can't find
anything in this post that proves me wrong.
Which books/sites are good/great/rubbish is mainly a subjective choice.
O'Reilly has a few that match MY taste, some are fond of the YOU-NAME-IT
for Dummies approach, others prefer a really dry & theoretical but very
exhausting summary. The pick is yours!
GL.
Sh.
Navigation:
[Reply to this message]
|