NEWBIE: validating drop down values

NEWBIE: validating drop down values

am 01.09.2007 20:25:08 von skim1114

I am embarrassed to ask this, but I've worked on this for hours and I
can't seem to find what the error is. I am trying to teach myself php
and I am in the very early stages of understanding it. I have a book
that I am walking through. I created a form to validate...all pieces
I've coded work, except the piece for the age drop down. There are 3
options, 0-20, 30-60, and 60+. What in the code is wrong here? I
understand this might not be the most efficient way to code this, but
like I said, I'm just starting.

I'm sure anyone with php knowledge could help me out with this in a
second.

Thanks in advance. Code below:

---------

if (isset($_REQUEST['age'])) {
$ = $_REQUEST['age'];

if ($age == '0-29') {
echo '

Your age selection was between 0-29

';
}elseif ($age == '30-60') {
echo '

You age selection was between 30-60

';
}elseif ($age == '60+') {
echo '

You age selection was between 60+

';
}else{
$age = NULL;
echo '

You forgot to select you age!

';
}

--------

Re: NEWBIE: validating drop down values

am 01.09.2007 20:30:22 von ELINTPimp

On Sep 1, 2:25 pm, skim1114 wrote:
> I am embarrassed to ask this, but I've worked on this for hours and I
> can't seem to find what the error is. I am trying to teach myself php
> and I am in the very early stages of understanding it. I have a book
> that I am walking through. I created a form to validate...all pieces
> I've coded work, except the piece for the age drop down. There are 3
> options, 0-20, 30-60, and 60+. What in the code is wrong here? I
> understand this might not be the most efficient way to code this, but
> like I said, I'm just starting.
>
> I'm sure anyone with php knowledge could help me out with this in a
> second.
>
> Thanks in advance. Code below:
>
> ---------
>
> if (isset($_REQUEST['age'])) {
> $ = $_REQUEST['age'];
>
> if ($age == '0-29') {
> echo '

Your age selection was between 0-29

';
> }elseif ($age == '30-60') {
> echo '

You age selection was between 30-60

';
> }elseif ($age == '60+') {
> echo '

You age selection was between 60+

';}else{
>
> $age = NULL;
> echo '

You forgot to select you age!

';
>
> }
>
> --------
> $ = $_REQUEST['age'];
needs to be:
$age = $_REQUEST['age'];

Re: NEWBIE: validating drop down values

am 01.09.2007 21:16:55 von Courtney

ELINTPimp wrote:
> On Sep 1, 2:25 pm, skim1114 wrote:
>> I am embarrassed to ask this, but I've worked on this for hours and I
>> can't seem to find what the error is. I am trying to teach myself php
>> and I am in the very early stages of understanding it. I have a book
>> that I am walking through. I created a form to validate...all pieces
>> I've coded work, except the piece for the age drop down. There are 3
>> options, 0-20, 30-60, and 60+. What in the code is wrong here? I
>> understand this might not be the most efficient way to code this, but
>> like I said, I'm just starting.
>>
>> I'm sure anyone with php knowledge could help me out with this in a
>> second.
>>
>> Thanks in advance. Code below:
>>
>> ---------
>>
>> if (isset($_REQUEST['age'])) {
>> $ = $_REQUEST['age'];
>>
>> if ($age == '0-29') {
>> echo '

Your age selection was between 0-29

';
>> }elseif ($age == '30-60') {
>> echo '

You age selection was between 30-60

';
>> }elseif ($age == '60+') {
>> echo '

You age selection was between 60+

';}else{
>>
>> $age = NULL;
>> echo '

You forgot to select you age!

';
>>
>> }
>>
>> --------
>> $ = $_REQUEST['age'];
> needs to be:
> $age = $_REQUEST['age'];
>

what does [ '30-60' ]evaluate to as well?..

a string "30-60"?
Or a numeric -30 ?

I suppose its a questiopn of what is in $age.... :-)

It's not clear..

Re: NEWBIE: validating drop down values

am 01.09.2007 21:27:47 von ELINTPimp

On Sep 1, 3:16 pm, The Natural Philosopher wrote:
> ELINTPimp wrote:
> > On Sep 1, 2:25 pm, skim1114 wrote:
> >> I am embarrassed to ask this, but I've worked on this for hours and I
> >> can't seem to find what the error is. I am trying to teach myself php
> >> and I am in the very early stages of understanding it. I have a book
> >> that I am walking through. I created a form to validate...all pieces
> >> I've coded work, except the piece for the age drop down. There are 3
> >> options, 0-20, 30-60, and 60+. What in the code is wrong here? I
> >> understand this might not be the most efficient way to code this, but
> >> like I said, I'm just starting.
>
> >> I'm sure anyone with php knowledge could help me out with this in a
> >> second.
>
> >> Thanks in advance. Code below:
>
> >> ---------
>
> >> if (isset($_REQUEST['age'])) {
> >> $ = $_REQUEST['age'];
>
> >> if ($age == '0-29') {
> >> echo '

Your age selection was between 0-29

';
> >> }elseif ($age == '30-60') {
> >> echo '

You age selection was between 30-60

';
> >> }elseif ($age == '60+') {
> >> echo '

You age selection was between 60+

';}else{
>
> >> $age = NULL;
> >> echo '

You forgot to select you age!

';
>
> >> }
>
> >> --------
> >> $ = $_REQUEST['age'];
> > needs to be:
> > $age = $_REQUEST['age'];
>
> what does [ '30-60' ]evaluate to as well?..
>
> a string "30-60"?
> Or a numeric -30 ?
>
> I suppose its a questiopn of what is in $age.... :-)
>
> It's not clear..

Yeah, I was assuming it was a string.

Re: NEWBIE: validating drop down values

am 01.09.2007 21:29:05 von luiheidsgoeroe

On Sat, 01 Sep 2007 21:16:55 +0200, The Natural Philosopher wrot=
e:

> ELINTPimp wrote:
>> On Sep 1, 2:25 pm, skim1114 wrote:
>>> I am embarrassed to ask this, but I've worked on this for hours and =
I
>>> can't seem to find what the error is. I am trying to teach myself ph=
p
>>> and I am in the very early stages of understanding it. I have a book=

>>> that I am walking through. I created a form to validate...all pieces=

>>> I've coded work, except the piece for the age drop down. There are 3=

>>> options, 0-20, 30-60, and 60+. What in the code is wrong here? I
>>> understand this might not be the most efficient way to code this, bu=
t
>>> like I said, I'm just starting.
>>>
>>> I'm sure anyone with php knowledge could help me out with this in a
>>> second.
>>>
>>> Thanks in advance. Code below:
>>>
>>> ---------
>>>
>>> if (isset($_REQUEST['age'])) {
>>> $ =3D $_REQUEST['age'];
>>>
>>> if ($age == '0-29') {
>>> echo '

Your age selection was between 0-29

';
>>> }elseif ($age == '30-60') {
>>> echo '

You age selection was between 30-60

';
>>> }elseif ($age == '60+') {
>>> echo '

You age selection was between 60+

';}els=
e{
>>>
>>> $age =3D NULL;
>>> echo '

You forgot to select you =

>>> age!

';
>>>
>>> }
>>>
>>> --------
>>> $ =3D $_REQUEST['age'];
>> needs to be:
>> $age =3D $_REQUEST['age'];
>>
>
> what does [ '30-60' ]evaluate to as well?..
>
> a string "30-60"?
> Or a numeric -30 ?

It should be just a string... Why would that be evaluated somewhere?
-- =

Rik Wasmus

My new ISP's newsserver sucks. Anyone recommend a good one? Paying for =

quality is certainly an option.

Re: NEWBIE: validating drop down values

am 01.09.2007 21:36:31 von luiheidsgoeroe

On Sat, 01 Sep 2007 21:27:47 +0200, ELINTPimp wrote:=


> On Sep 1, 3:16 pm, The Natural Philosopher wrote:
>> ELINTPimp wrote:
>> > On Sep 1, 2:25 pm, skim1114 wrote:
>> >> I am embarrassed to ask this, but I've worked on this for hours an=
d I
>> >> can't seem to find what the error is. I am trying to teach myself =
php
>> >> and I am in the very early stages of understanding it. I have a bo=
ok
>> >> that I am walking through. I created a form to validate...all piec=
es
>> >> I've coded work, except the piece for the age drop down. There are=
3
>> >> options, 0-20, 30-60, and 60+. What in the code is wrong here? I
>> >> understand this might not be the most efficient way to code this, =
but
>> >> like I said, I'm just starting.
>>
>> >> I'm sure anyone with php knowledge could help me out with this in =
a
>> >> second.
>>
>> >> Thanks in advance. Code below:
>>
>> >> ---------
>>
>> >> if (isset($_REQUEST['age'])) {
>> >> $ =3D $_REQUEST['age'];
>>
>> >> if ($age == '0-29') {
>> >> echo '

Your age selection was between 0-29

';=

>> >> }elseif ($age == '30-60') {
>> >> echo '

You age selection was between 30-60

';=

>> >> }elseif ($age == '60+') {
>> >> echo '

You age selection was between =

>> 60+

';}else{
>>
>> >> $age =3D NULL;
>> >> echo '

You forgot to select you =

>> age!

';
>>
>> >> }
>>
>> >> --------
>> >> $ =3D $_REQUEST['age'];
>> > needs to be:
>> > $age =3D $_REQUEST['age'];
>>
>> what does [ '30-60' ]evaluate to as well?..
>>
>> a string "30-60"?
>> Or a numeric -30 ?
>>
>> I suppose its a questiopn of what is in $age.... :-)
>>
>> It's not clear..
>
> Yeah, I was assuming it was a string.

Perfectly reasonable as all GET, POST & COOKIE values are initially =

considered strings by PHP.
-- =

Rik Wasmus

My new ISP's newsserver sucks. Anyone recommend a good one? Paying for =

quality is certainly an option.

Re: NEWBIE: validating drop down values

am 01.09.2007 21:45:58 von luiheidsgoeroe

On Sat, 01 Sep 2007 20:25:08 +0200, skim1114 wrote:=


> I am embarrassed to ask this, but I've worked on this for hours and I
> can't seem to find what the error is. I am trying to teach myself php
> and I am in the very early stages of understanding it. I have a book
> that I am walking through. I created a form to validate...all pieces
> I've coded work, except the piece for the age drop down. There are 3
> options, 0-20, 30-60, and 60+. What in the code is wrong here?

What is actually going wrong? And what is in $_REQUEST['age'] if you che=
ck =

it?

> I
> understand this might not be the most efficient way to code this, but
> like I said, I'm just starting.
>
> I'm sure anyone with php knowledge could help me out with this in a
> second.
>
> Thanks in advance. Code below:
>
> ---------
>
> if (isset($_REQUEST['age'])) {

Its preferable to explicitly state where the value comes from, so =

$_GET['age'], $_POST['age'] etc.

> $ =3D $_REQUEST['age'];
>
> if ($age == '0-29') {
> echo '

Your age selection was between 0-29

';
> }elseif ($age == '30-60') {
> echo '

You age selection was between 30-60

';
> }elseif ($age == '60+') {
> echo '

You age selection was between 60+

';
> }else{
> $age =3D NULL;
> echo '

You forgot to select you age!

=
';
> }

You might want to look into a switch statement (I'll assume POST, change=
=

if this isn't the case):
$age =3D false;
if(isset($_POST['age']){
switch($_POST['age']){
case '0-29':
case '30-60':
case '60+':
$age =3D $_POST['age'];
echo "

Your age selection was {$_POST['age']}

";
break;
default:
echo '

'.htmlspecialchars($_POST['age']).' is =
not =

a valid selection.

';
=

}
}
if($age===3Dfalse) echo '

You forgot to selec=
t you =

age!

';
?>

Or a 'valids' array:

$valids =3D array('0-29','30-60','60+');
if(isset($_POST['age']) && in_array($_POST['age'],$valids){
echo "

Your age selection was {$_POST['age']}

"; =

} else {
echo '

Please select a valid age.

'
}
?>

-- =

Rik Wasmus

My new ISP's newsserver sucks. Anyone recommend a good one? Paying for =

quality is certainly an option.

Re: NEWBIE: validating drop down values

am 02.09.2007 00:22:16 von Hans-Peter Sauer




<1188671108.175820.130920@50g2000hsm.googlegroups.com>

> if (isset($_REQUEST['age'])) {
> $ = $_REQUEST['age'];
>
> if ($age == '0-29') {
> echo '

Your age selection was between 0-29

';
> }elseif ($age == '30-60') {
> echo '

You age selection was between 30-60

';
> }elseif ($age == '60+') {
> echo '

You age selection was between 60+

';
> }else{
> $age = NULL;
> echo '

You forgot to select you age!

';
> }
>

What you could do is rewrite it so its easier to understand .

Just change the days of week to the age groups .






$jamesbond=$_REQUEST['madmax'];

$pass=1;
if ($jamesbond<0) {$pass=0;}
if ($jamesbond>7) {$pass=0;}
if ($pass==0) {print "SOMETHING IS WRONG"; exit;}

$zx[1]="MONDAY";
$zx[2]="TUESDAY";
$zx[3]="WEDNESDAY";
$zx[4]="THURSDAY";
$zx[5]="FRIDAY";
$zx[6]="SATURDAY";
$zx[7]="SUNDAY";

$newbie=$zx[$jamesbond];


Do whatever you want with the $newbie variable .


--
(c) The Amazing Krustov

Re: NEWBIE: validating drop down values

am 02.09.2007 00:26:12 von Hans-Peter Sauer






> if ($jamesbond<0) {$pass=0;}
>

That line should be the following .....

if ($jamesbond<1) {$pass=0;}


--
(c) The Amazing Krustov

Re: NEWBIE: validating drop down values

am 02.09.2007 01:04:16 von Jerry Stuckle

Krustov wrote:
>
>
>
> <1188671108.175820.130920@50g2000hsm.googlegroups.com>
>
>> if (isset($_REQUEST['age'])) {
>> $ = $_REQUEST['age'];
>>
>> if ($age == '0-29') {
>> echo '

Your age selection was between 0-29

';
>> }elseif ($age == '30-60') {
>> echo '

You age selection was between 30-60

';
>> }elseif ($age == '60+') {
>> echo '

You age selection was between 60+

';
>> }else{
>> $age = NULL;
>> echo '

You forgot to select you age!

';
>> }
>>
>
> What you could do is rewrite it so its easier to understand .
>
> Just change the days of week to the age groups .
>
>
>
>
>
>
> $jamesbond=$_REQUEST['madmax'];
>
> $pass=1;
> if ($jamesbond<0) {$pass=0;}
> if ($jamesbond>7) {$pass=0;}
> if ($pass==0) {print "SOMETHING IS WRONG"; exit;}
>
> $zx[1]="MONDAY";
> $zx[2]="TUESDAY";
> $zx[3]="WEDNESDAY";
> $zx[4]="THURSDAY";
> $zx[5]="FRIDAY";
> $zx[6]="SATURDAY";
> $zx[7]="SUNDAY";
>
> $newbie=$zx[$jamesbond];
>
>
> Do whatever you want with the $newbie variable .
>
>

Sorry, this is much HARDER to understand. And much worse than the
original code, IMHO.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: NEWBIE: validating drop down values

am 02.09.2007 01:26:38 von Hans-Peter Sauer






> this is much HARDER to understand
>

Thats ok - stick at it and eventually you will stop being a newbie .


--
(c) The Amazing Krustov

Re: NEWBIE: validating drop down values

am 02.09.2007 01:33:57 von skim1114

I did have $age...for some reason I accidentally deleted it when I
posted here.

I am working or using the book "PHP and MySQL for dynamic websites"
By Larry Ullman.

It is validating the age selection in a form:

------

if (isset($_REQUEST['age'])) {
$age = $_REQUEST['age'];

if ($age == '0-29') {
echo '

Your age selection was between 0-29

';
}elseif ($age == '30-60') {
echo '

You age selection was between 30-60

';
}elseif ($age == '60+') {
echo '

You age selection was between 60+

';
}else{
$age = NULL;
echo '

You forgot to select you age!

';
}

Re: NEWBIE: validating drop down values

am 02.09.2007 02:28:26 von skim1114

For whatever it's worth I finally figured it out...maybe I didn't give
enough info on the post:

if (isset($_REQUEST['age'])) {
$age = $_REQUEST['age'];

if ($age == '0-29') {
$message2 = '

Your age selection was between 0-29

';
}elseif ($age == '30-60') {
$message2 = '

You age selection was between 30-60

';
}elseif ($age == '60+') {
$message2 = '

You age selection was between 60+

';
}else{
$message2 = NULL;
echo '

Age must be selected!

';
}
}else{ //not set
$age = NULL;
echo '

You forgot to select your age! p>';
}

Re: NEWBIE: validating drop down values

am 02.09.2007 03:59:54 von Jerry Stuckle

Krustov wrote:
>
>
>
>
>
>> this is much HARDER to understand
>>
>
> Thats ok - stick at it and eventually you will stop being a newbie .
>
>

Crap like that? No way. If I ever saw that from someone on one of my
projects, they'd be out the door so fast you could hear the sonic boom.

NO programmer worth his salt would EVER program like that. But then
you've already proven you're not a programmer - just a wanna be.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: NEWBIE: validating drop down values

am 02.09.2007 13:28:01 von Hans-Peter Sauer






> Crap like that? No way. If I ever saw that from someone on one of my
> projects, they'd be out the door so fast you could hear the sonic boom.
>
> NO programmer worth his salt would EVER program like that. But then
> you've already proven you're not a programmer - just a wanna be
>

www.vhit.co.uk/banana.php

Re: NEWBIE: validating drop down values

am 02.09.2007 13:28:02 von Hans-Peter Sauer






> Crap like that? No way. If I ever saw that from someone on one of my
> projects, they'd be out the door so fast you could hear the sonic boom.
>
> NO programmer worth his salt would EVER program like that. But then
> you've already proven you're not a programmer - just a wanna be
>

Such passion .


--
(c) The Amazing Krustov

Re: NEWBIE: validating drop down values

am 02.09.2007 15:07:27 von Jerry Stuckle

Krustov wrote:
>
>
>
>
>
>> Crap like that? No way. If I ever saw that from someone on one of my
>> projects, they'd be out the door so fast you could hear the sonic boom.
>>
>> NO programmer worth his salt would EVER program like that. But then
>> you've already proven you're not a programmer - just a wanna be
>>
>
> Such passion .
>
>

Such shitty code.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: NEWBIE: validating drop down values

am 02.09.2007 15:30:52 von Hans-Peter Sauer






> >> Crap like that? No way. If I ever saw that from someone on one of my
> >> projects, they'd be out the door so fast you could hear the sonic boom.
> >>
> >> NO programmer worth his salt would EVER program like that. But then
> >> you've already proven you're not a programmer - just a wanna be
> >>
> >
> > Such passion .
> >
> >
>
> Such shitty code
>

Your not interested in php code - you only want to argue .


--
(c) The Amazing Krustov

Re: NEWBIE: validating drop down values

am 02.09.2007 15:44:38 von Jerry Stuckle

Krustov wrote:
>
>
>
>
>
>>>> Crap like that? No way. If I ever saw that from someone on one of my
>>>> projects, they'd be out the door so fast you could hear the sonic boom.
>>>>
>>>> NO programmer worth his salt would EVER program like that. But then
>>>> you've already proven you're not a programmer - just a wanna be
>>>>
>>> Such passion .
>>>
>>>
>> Such shitty code
>>
>
> Your not interested in php code - you only want to argue .
>
>

No, I'm interested in PHP code - but GOOD code, not the crap you posted.

As I (and others) have told you before - if you're going to post example
code, it needs to be a *GOOD* example. Your code was worse than most
which has been posted in this group by complete newbies. And at least
they're trying to write good code. You don't care.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: NEWBIE: validating drop down values

am 02.09.2007 16:05:56 von Hans-Peter Sauer






> As I (and others) have told you before - if you're going to post example
> code, it needs to be a *GOOD* example
>

Your jack boot nazi words are meaningless .


--
(c) The Amazing Krustov

Re: NEWBIE: validating drop down values

am 02.09.2007 16:07:57 von Jerry Stuckle

Krustov wrote:
>
>
>
>
>
>> As I (and others) have told you before - if you're going to post example
>> code, it needs to be a *GOOD* example
>>
>
> Your jack boot nazi words are meaningless .
>
>

ROFLMAO! The troll can't defend his code, so he has to start calling names.

Better watch it or your mommy might send you to your room.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: NEWBIE: validating drop down values

am 02.09.2007 16:20:12 von Hans-Peter Sauer






> >> As I (and others) have told you before - if you're going to post example
> >> code, it needs to be a *GOOD* example
> >>
> >
> > Your jack boot nazi words are meaningless .
> >
> >
>
> ROFLMAO! The troll can't defend his code, so he has to start calling names
>

Nazis always do regard themselves as being superior .


--
(c) The Amazing Krustov

Re: NEWBIE: validating drop down values

am 02.09.2007 16:24:37 von luiheidsgoeroe

On Sun, 02 Sep 2007 16:20:12 +0200, Krustov wrote:

>
>
>
>
>
>> >> As I (and others) have told you before - if you're going to post
>> example
>> >> code, it needs to be a *GOOD* example
>> >>
>> >
>> > Your jack boot nazi words are meaningless .
>> >
>> >
>>
>> ROFLMAO! The troll can't defend his code, so he has to start calling
>> names
> Nazis always do regard themselves as being superior .

Well it ain't about PHP anymore.....

I'd like to state one thing about mentioning
nazi's:

"...whoever mentioned the Nazis has automatically "lost" whatever debate
was in progress...."
--
Rik Wasmus

Re: NEWBIE: validating drop down values

am 02.09.2007 20:02:26 von foogow

Jerry Stuckle wrote:
>
> Better watch it or your mommy might send you to your room.
>

Get a life.
Do have any friends? A partner?
Do do anything except troll this newsgroup, competing to be top jerk?
Are you autistic?

Be helpful and constructive. Else get lost and don't come back.

Re: NEWBIE: validating drop down values

am 02.09.2007 20:30:34 von Jerry Stuckle

foogow wrote:
> Jerry Stuckle wrote:
>>
>> Better watch it or your mommy might send you to your room.
>>
>
> Get a life.
> Do have any friends? A partner?
> Do do anything except troll this newsgroup, competing to be top jerk?
> Are you autistic?
>
> Be helpful and constructive. Else get lost and don't come back.

Yep, you should try to be helpful and constructive.

And it would be much better for this group if you got lost and didn't
come back.

So why not take your own advice?

Check back through here. My first post was helpful to the original op -
it pointed out that the code posted was a piece of crap. And this isn't
the first time Krustov has been told his code does not set good examples
for newcomers.

And if you don't like my pointing out bad code for what it is, tough
shit. I'll continue to do it - and continue to post helpful code, tips
and comments where appropriate.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: NEWBIE: validating drop down values

am 02.09.2007 21:21:34 von Hans-Peter Sauer




<46DB014A.70308@attglobal.net>

> this isn't
> the first time Krustov has been told his code does not set good examples
> for newcomers
>

Then clearly you havent been doing a very good job of it .

Full examples of krusty code can be downloaded via
www.outerlimitsfan.co.uk/download.php

You will also learn how to incorporate web design into a website as
learning php is only part of the skills you need to create a good
looking website .


--
(c) The Amazing Krustov

Re: NEWBIE: validating drop down values

am 02.09.2007 21:30:32 von foogow

Jerry Stuckle wrote:
>
>
> And if you don't like my pointing out bad code for what it is, tough
> shit.
I don't necessarily disagree with your assessment.
It might be more constructive to use less inflammatory words.
Myself included.

Re: NEWBIE: validating drop down values

am 02.09.2007 21:35:58 von Jerry Stuckle

Krustov wrote:
>
>
>
> <46DB014A.70308@attglobal.net>
>
>> this isn't
>> the first time Krustov has been told his code does not set good examples
>> for newcomers
>>
>
> Then clearly you havent been doing a very good job of it .
>
> Full examples of krusty code can be downloaded via
> www.outerlimitsfan.co.uk/download.php
>
> You will also learn how to incorporate web design into a website as
> learning php is only part of the skills you need to create a good
> looking website .
>
>

Just because you posted it on some Outer Limits fan site in the UK
doesn't mean it's any good. Is there anyone on that site competent to
comment on your code? From what I've seen there, no. And you aim it at
beginners who don't know good from bad. Too bad for them.

But I did look at your code. It's even worst than the stuff you've
posted here. I mean - I've seen code which is hard to follow, but this
takes the cake.

And it only works on a Windows server?

Try posting it to real PHP sites for peer review.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: NEWBIE: validating drop down values

am 02.09.2007 21:44:56 von Jerry Stuckle

foogow wrote:
> Jerry Stuckle wrote:
>>
>>
>> And if you don't like my pointing out bad code for what it is, tough
>> shit.
> I don't necessarily disagree with your assessment.
> It might be more constructive to use less inflammatory words.
> Myself included.

People have tried using less inflammatory words with him before. But
all he does is defend his code as a good example. after all, *he* likes it.

I'm just tired of him trying to pass off his code as good stuff on new
programmers who don't know any better.

As for you - check your first post in this thread. And tell me who's
being inflammatory. Just to help you remember, here it is:

----
Get a life.
Do have any friends? A partner?
Do do anything except troll this newsgroup, competing to be top jerk?
Are you autistic?

Be helpful and constructive. Else get lost and don't come back.
----

You call this helpful and constructive? You made a personal attack.
Notice I did not attack you personally in response.

So maybe you should take your own advice before dispensing it to others.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: NEWBIE: validating drop down values

am 02.09.2007 21:49:45 von Hans-Peter Sauer






> Try posting it to real PHP sites for peer review
>

Do you mean you can get fake PHP sites ? .


--
(c) The Amazing Krustov

Re: NEWBIE: validating drop down values

am 02.09.2007 21:51:21 von luiheidsgoeroe

On Sun, 02 Sep 2007 21:21:34 +0200, Krustov wrote:

>
>
>
> <46DB014A.70308@attglobal.net>
>
>> this isn't
>> the first time Krustov has been told his code does not set good examp=
les
>> for newcomers
>>
>
> Then clearly you havent been doing a very good job of it .

Hehe, every thread were this is pointed out derails quite quickly...

> Full examples of krusty code can be downloaded via
> www.outerlimitsfan.co.uk/download.php

Hehe, I open a random file (aaacommon.php), let's start at the top:
[quote]


include('zx_title_block.php'); ?>


exit;
[/quote]

and then some 300 lines of never used code... I hope for your sake this =
is =

work in progress :) (and why would you need to output empty lines?

> You will also learn how to incorporate web design into a website as
> learning php is only part of the skills you need to create a good
> looking website .

Webdesign I leave to other people. I create PHP code, and possibly HTML.=
=

The graphic guy can perfectly create CSS for it.
-- =

Rik Wasmus

Re: NEWBIE: validating drop down values

am 02.09.2007 22:00:50 von luiheidsgoeroe

On Sun, 02 Sep 2007 21:49:45 +0200, Krustov wrote:

>
>
>
>
>
>> Try posting it to real PHP sites for peer review
>>
>
> Do you mean you can get fake PHP sites ? .
>

He means sites dedicated to PHP, not sites created by PHP.
--
Rik Wasmus

Re: NEWBIE: validating drop down values

am 02.09.2007 22:39:16 von foogow

Jerry Stuckle wrote:
> So maybe you should take your own advice before dispensing it to others.
>

....agreed. That's why I said "myself included."
Flames tend to spread like a grass fire, igniting the surroundings.
I'm doing my best not to make it worse now (after having done
so once, as you pointed out).

Re: NEWBIE: validating drop down values

am 02.09.2007 22:40:53 von Jerry Stuckle

foogow wrote:
> Jerry Stuckle wrote:
>> So maybe you should take your own advice before dispensing it to others.
>>
>
> ...agreed. That's why I said "myself included."
> Flames tend to spread like a grass fire, igniting the surroundings.
> I'm doing my best not to make it worse now (after having done
> so once, as you pointed out).

No problem. I'm willing to drop it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: NEWBIE: validating drop down values

am 03.09.2007 00:56:36 von unknown

Post removed (X-No-Archive: yes)

Re: NEWBIE: validating drop down values

am 03.09.2007 00:57:44 von unknown

Post removed (X-No-Archive: yes)

Re: NEWBIE: validating drop down values

am 03.09.2007 03:10:14 von Jerry Stuckle

Gary L. Burnore wrote:
> On Sun, 02 Sep 2007 16:40:53 -0400, Jerry Stuckle
> wrote:
>
>> foogow wrote:
>>> Jerry Stuckle wrote:
>>>> So maybe you should take your own advice before dispensing it to others.
>>>>
>>> ...agreed. That's why I said "myself included."
>>> Flames tend to spread like a grass fire, igniting the surroundings.
>>> I'm doing my best not to make it worse now (after having done
>>> so once, as you pointed out).
>> No problem. I'm willing to drop it.
>
> So then do it.

Who asked another troll to chime in?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: NEWBIE: validating drop down values

am 03.09.2007 05:11:12 von unknown

Post removed (X-No-Archive: yes)

Re: NEWBIE: validating drop down values

am 03.09.2007 06:01:29 von Jerry Stuckle

Gary L. Burnore wrote:
> On Sun, 02 Sep 2007 21:10:14 -0400, Jerry Stuckle
> wrote:
>
>> Gary L. Burnore wrote:
>>> On Sun, 02 Sep 2007 16:40:53 -0400, Jerry Stuckle
>>> wrote:
>>>
>>>> foogow wrote:
>>>>> Jerry Stuckle wrote:
>>>>>> So maybe you should take your own advice before dispensing it to others.
>>>>>>
>>>>> ...agreed. That's why I said "myself included."
>>>>> Flames tend to spread like a grass fire, igniting the surroundings.
>>>>> I'm doing my best not to make it worse now (after having done
>>>>> so once, as you pointed out).
>>>> No problem. I'm willing to drop it.
>>> So then do it.
>> Who asked another troll to chime in?
>
> Are you ever not an idiot?

All the time. Are you ever not a troll?

This thread was ending just fine before you stuck your fat ass in here.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: NEWBIE: validating drop down values

am 03.09.2007 08:23:45 von luiheidsgoeroe

On Mon, 03 Sep 2007 00:57:44 +0200, Gary L. Burnore
wrote:

> On Sun, 02 Sep 2007 16:40:53 -0400, Jerry Stuckle
> wrote:
>
>> foogow wrote:
>>> Jerry Stuckle wrote:
>>>> So maybe you should take your own advice before dispensing it to
>>>> others.
>>>>
>>>
>>> ...agreed. That's why I said "myself included."
>>> Flames tend to spread like a grass fire, igniting the surroundings.
>>> I'm doing my best not to make it worse now (after having done
>>> so once, as you pointed out).
>>
>> No problem. I'm willing to drop it.
>
> So then do it.

Hehehe. "No you hang up first."
--
Rik Wasmus

Re: NEWBIE: validating drop down values

am 03.09.2007 14:35:01 von Jerry Stuckle

Rik Wasmus wrote:
> On Mon, 03 Sep 2007 00:57:44 +0200, Gary L. Burnore
> wrote:
>
>> On Sun, 02 Sep 2007 16:40:53 -0400, Jerry Stuckle
>> wrote:
>>
>>> foogow wrote:
>>>> Jerry Stuckle wrote:
>>>>> So maybe you should take your own advice before dispensing it to
>>>>> others.
>>>>>
>>>>
>>>> ...agreed. That's why I said "myself included."
>>>> Flames tend to spread like a grass fire, igniting the surroundings.
>>>> I'm doing my best not to make it worse now (after having done
>>>> so once, as you pointed out).
>>>
>>> No problem. I'm willing to drop it.
>>
>> So then do it.
>
> Hehehe. "No you hang up first."

Actually, Rik, check back. He hadn't said anything before in this thread.

I think he's just a troll trying to keep the thread going for unknown
reasons. I can see no other reason that he would stick his fat ass in here.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: NEWBIE: validating drop down values

am 03.09.2007 14:45:28 von luiheidsgoeroe

On Mon, 03 Sep 2007 14:35:01 +0200, Jerry Stuckle
wrote:

> Rik Wasmus wrote:
>> On Mon, 03 Sep 2007 00:57:44 +0200, Gary L. Burnore
>> wrote:
>>
>>> On Sun, 02 Sep 2007 16:40:53 -0400, Jerry Stuckle
>>> wrote:
>>>
>>>> foogow wrote:
>>>>> Jerry Stuckle wrote:
>>>>>> So maybe you should take your own advice before dispensing it to
>>>>>> others.
>>>>>>
>>>>>
>>>>> ...agreed. That's why I said "myself included."
>>>>> Flames tend to spread like a grass fire, igniting the surroundings.
>>>>> I'm doing my best not to make it worse now (after having done
>>>>> so once, as you pointed out).
>>>>
>>>> No problem. I'm willing to drop it.
>>>
>>> So then do it.
>> Hehehe. "No you hang up first."
>
> Actually, Rik, check back. He hadn't said anything before in this
> thread.

I know, I just couldn't resist to mention the analogy.

> I think he's just a troll trying to keep the thread going for unknown
> reasons. I can see no other reason that he would stick his fat ass in
> here.

't Was a weird post indeed. Then again, not wanting to have the last word
would've solved it too ;P
--
Rik Wasmus