Error Messaging not working


Posted on 16th Feb 2014 07:03 pm by admin

I changed the way my form tells the user of an error. But I can't seem to get it to work properly. Any help would be great. Thanks.

Code: // IF NO errors process form
if ($error == "") {

.
. code to email form
.
}
else {
// List errors
echo '<p class="error">'$error'</p>';
$output_form = true;
}
Error messages look like this..

Code: if (empty($first_name) && empty($last_name)) { // IF first and last are empty - REQUIRED FIELD
$error .= 'Please input your FIRST NAME and LAST NAME.<br />';
$output_form = true;
}

if (empty($first_name)) { // IF first only is empty - REQUIRED FIELD
$error .= 'Please input your FIRST NAME.<br />';
$output_form = true;
}

No comments posted yet

Your Answer:

Login to answer
176 Like 23 Dislike
Previous forums Next forums
Other forums

Hotlinking Picasa as the image folder of a website
Hi there PHP freaks, I would like to create a private album in Picasa to use it as the image folder

How to convert this array to string
I am having problems converting this array to a string
using print_r($val[1]); I get:
Code: [

convert static html data into dynamic
hi all

i need to convert a website which has static above 2000 articles into dynamic and add

making web pages for accounts
Hello, I would like to make pages for accounts on my website im making (its not a real website..im j

getting weird error..
okay, I'm getting an error on this particular function, something about the syntax in the mysql LIMI

Wierd if else problem
Hi guys,

this probably aint wierd for you, but it seems like php is playin up to me. may b i

mail()
Hi all. I have a problem with emails. I am trying to set up a mail system where customers can subscr

Required to login help
I'm trying to set up my site so users have to be logged into the forum to access the site.I've been

Removing Title From database problem
Hi again ! i am having an issue with updating database. When i update any price of a title it remove

Whats wrong with my query?
I am trying to get this query to show the appropriate ticked vehicle roof height, unless no boxs are

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash