Webmaster Forum

Advertise Here   High Bandwidth Dedicated Servers   V7N Directory
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Reply
 
LinkBack Thread Tools Display Modes
Old 12-10-2007, 03:29 PM   #1 (permalink)
v7n Mentor
 
jdspc's Avatar
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 640
iTrader: 0 / 0%
Latest Blog:
Why I Do What I Do?

jdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of light
Form error detection

Greetings

I created an employment application using php and I neglected to add any error detection.
There are more than 100 entries, yet not all are necessary.
Is there a way to add error detection using one line to isolate the mandatory entries?
Plus if there are errors, I would like to retain all info previously entered...


Error detection example…
Code:
<? if ($_POST[sender_email] == ""){ $email_err = "<font color=red>Please enter your E-Mail!</font><br>"; $send="no"; ?>

Jeff
jdspc is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 12-12-2007, 06:04 AM   #2 (permalink)
v7n Mentor
 
Sketch's Avatar
 
Join Date: 05-06-04
Location: London, UK
Posts: 1,452
iTrader: 0 / 0%
Latest Blog:
None

Sketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web pro
I would do something like this;

Code:
<input name="person_name" type="text" value="<?php echo $_POST['person_name']; ?>" />
As long as your form posts to the same page then all the fields should retain the information
Sketch is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-13-2007, 12:43 AM   #3 (permalink)
v7n Mentor
 
jdspc's Avatar
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 640
iTrader: 0 / 0%
Latest Blog:
Why I Do What I Do?

jdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of light
Thanks!

I thought of that on the way home yesterday...

I just need to come up with a creative one-liner to detect omission of 1 or more entry out of 50 diff fields.

Many Thanks!
jdspc is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-13-2007, 03:07 AM   #4 (permalink)
Contributing Member
 
Join Date: 07-24-06
Posts: 565
iTrader: 1 / 100%
Latest Blog:
None

nasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the rough
Don't you want to validate the form with javascript before it is submitted?
nasty.web is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-13-2007, 05:05 AM   #5 (permalink)
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 358
iTrader: 0 / 0%
Latest Blog:
None

Boogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebody
Quote:
Don't you want to validate the form with javascript before it is submitted?
I agree,

Does PHP have the equivalent of ASP error detection? It's excellent and is all client-side, so less post-backs, which means faster data entry, which means easier to use, which means more user-friendly, which means more success!
__________________
Price is what you pay... Value is what you get.
Boogle is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-13-2007, 05:31 AM   #6 (permalink)
Contributing Member
 
Join Date: 07-24-06
Posts: 565
iTrader: 1 / 100%
Latest Blog:
None

nasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the rough
Quote:
Originally Posted by Boogle View Post
I agree,

Does PHP have the equivalent of ASP error detection? It's excellent and is all client-side, so less post-backs, which means faster data entry, which means easier to use, which means more user-friendly, which means more success!
Which means more money. Which means expensive cars and maybe drug addiction or car accident. Which means ruined life forever !!!

Use Basic for DOS and live long and happy.
nasty.web is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-13-2007, 11:24 AM   #7 (permalink)
v7n Mentor
 
jdspc's Avatar
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 640
iTrader: 0 / 0%
Latest Blog:
Why I Do What I Do?

jdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of light
Validation! Thats what I'm looking for!

Yess, validate the form, but using one line. Not all entries are mandatory.
Like the example above...covering 50 fields.

I'm not being lazy, I have already entered the line(s) needed but more forms are coming in and brevity seems to add to clarity.

Thanks again
jdspc is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-13-2007, 12:54 PM   #8 (permalink)
Contributing Member
 
Join Date: 07-24-06
Posts: 565
iTrader: 1 / 100%
Latest Blog:
None

nasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the roughnasty.web is a jewel in the rough
You can check LiveValidation. It's pretty but it's more that one line.
nasty.web is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-13-2007, 02:11 PM   #9 (permalink)
v7n Mentor
 
jdspc's Avatar
 
Join Date: 12-05-07
Location: Clear Lake City, TX
Posts: 640
iTrader: 0 / 0%
Latest Blog:
Why I Do What I Do?

jdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of lightjdspc is a glorious beacon of light
Not what I was looking for, the form works wonderfully, I am getting a lot of apps without the mandatory information.
I think it is going to come down to creative declarations.
I have an idea and will post it if it works.
jdspc is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
image detection Tatan Google Forum 1 05-29-2007 02:13 PM
Error popup on form submit ToddW Coding Forum 3 08-11-2006 05:07 AM
Language Detection kwvarga Coding Forum 0 11-27-2005 12:03 AM
Browser Detection Jazzee Coding Forum 24 12-05-2003 08:48 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 01:18 PM.
© Copyright 2008 V7 Inc


Search Engine Optimization by vBSEO 3.1.0 ©2007, Crawlability, Inc.