align-toparrow-leftarrow-rightbackbellblockcalendarcamerachatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-crosscrosseditfacebookglobegoogleimagesinstagramlocation-pinmagnifying-glassmailmoremuplabelShape 3 + Rectangle 1outlookpersonplusImported LayersImported LayersImported Layersshieldstartwitteryahoo

Kansas City's PHP User Group Message Board › undefined index notices (3)

undefined index notices (3)

Jacob Landon S.
user 74654852
Kansas City, MO
Post #: 1
dave s.
user 79550002
Lenexa, KS
Post #: 7
hello jacob..
thanx for your help and reply..
the code you gives me takes me to error page listing missing email and missing message, even if fields
filled in correctly..
i have had those results at some point or another...
is it easier or harder to hand off from php to html about missing info next to allowed <span> ..?
i do appreciate the attn you gave this..
thanx again
Jacob Landon S.
user 74654852
Kansas City, MO
Post #: 2
hello jacob..
thanx for your help and reply..
the code you gives me takes me to error page listing missing email and missing message, even if fields
filled in correctly..
i have had those results at some point or another...
is it easier or harder to hand off from php to html about missing info next to allowed <span> ..?
i do appreciate the attn you gave this..
thanx again

This is part of the reason I like to separate isset() conditions out. The behavior of isset() is well documented, but PHP has bugs.

Try the link again.

Generally, I like to have the error messages next to the field that the message pertains. However, it mostly depends on how lazy I'm being.
dave s.
user 79550002
Lenexa, KS
Post #: 8
hello jacob.
your fix worked . looks clean too.
i go thru now and compare new / old and chew why old didnt work.
i have been reading how to easily put errors next to pertinent fields..

Also, someone said i should be studying 'classes' for php..
also, someone said that this is waste-o-time.. that i am trying to reinvent the wheel and should be
looking @ something like codeigniter.
it uses rules.. i have not looked at it, but makes me think of CSS..

do ppl here have opinions about anything i just mentioned?

also,,, i looked at wordpress.. seems like a body has to blog to use that.. can i get anything out of it w/o blogging?

thanx again jacob ++ all who read and / or posts
dave s.
user 79550002
Lenexa, KS
Post #: 9
in trying to put errors next to same fields, i changed this working htML code snip:
<div class="input">
<input type="text" name="email" id="email" size="30" /><span class="emailError, emailError2"></span>

<div class="error" id="emailError">
<p stlye="float:left"/>Require­d: Please enter your email address
</div>


to this::

<div class="input">
<input type="text" name="email" id="email" size="30" /><span class="emailError, emailError2"></span>

<div class="error" id="emailError" value="<?php echo $error_message; ?>"><br>
<p stlye="float:left"/>Require­d: Please enter your email address
</div>

i also tried ::
<div class="error" id="emailError" <span>"<?php echo $error_message.='Required: Please enter your email address'; ?></span><br>
<p stlye="float:left"/>Require­d: Please enter your email address
</div>

the first snip is for js validation..it displays errors next to appropriate fields IF user java is turned on.
i wanted to keep the js validation and add the php validation using an external php file..
of course the php example doesnt work..
the $error_message comes from the .php file..
am i close?..

i have tried moving the tiny php line to other locations,,
also i tried with and without the <span> tag..
still i get taken to the error page..

thanx for lookin
dave s.
user 79550002
Lenexa, KS
Post #: 10
hi:
so, i think it was mentioned :: put php in here <form onSubmit="return checkForm();" method="post" action="php/Send_Questions.php"­> as something like <form onSubmit="return checkForm();" method="post" action="this.php"­>
put the validation code in the <head> ??
so i have a php validation and js in the head ..then all goes thru and i need the rest of the php processing to go thru.
but the onSubmit value is taken by the js, how do i do the processing w/php?
thanx
Powered by mvnForum

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy