Web Hosting Vodahost    

Home Take The Royal Tour! Order Now Features Prices
Go Back   Web Hosting > VodaHost Web Hosting Support > mySQL & PHP

Notices

mySQL & PHP Discussions, information and help with mySQL and PHP.

Reply
 
LinkBack Thread Tools
  #1  
Old 07-04-2006, 12:31 PM
Second Lieutenant
 
Join Date: Mar 2006
Posts: 114
Default help for validating forms

hi can some pls pls help me validating this form...i have been struggling hard to write a php script but always something goes wrong...this is the url... WWW.LEXIMINDIA.COM i would be very thankful if some can write a script for me pls...
many thanks
chandni
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old 07-04-2006, 12:55 PM
Andy128's Avatar
Major General
 
Join Date: Dec 2005
Location: Michigan
Posts: 2,282
Default Re: help for validating forms

chandni-

What you are asking is very involved and is not a simple thing. To get it right, and professional, I recommend that you look at this;

http://www.vodahost.com/vodatalk/fre...g-service.html

There is quite a bit of work there- for example, your form does not have a submit button. Aside from that, this extensive of a form needs validation for required fields and security measures in the script. Watdaflip would be my choice for something like this.

Cheers,

Andy
__________________
My diamond in the rough - www.123gpp.com

* Click here for some BV tutorials (Php mailto Form, I-Frames, Picture display and much, much more!)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old 07-04-2006, 08:15 PM
Corporal
 
Join Date: Jun 2006
Location: Belgium
Posts: 10
Default Re: help for validating forms

If i where you I would use javascript for the validation.
You can find some help on this topic at Form Validation : Introduction - JavaScript Tutorial - EchoEcho.Com - Beginners best choice!
You could also use php, but your page would have to be reloaded everytime somthing isn't right. I think javascript is the easiest solution for you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old 07-04-2006, 08:31 PM
Andy128's Avatar
Major General
 
Join Date: Dec 2005
Location: Michigan
Posts: 2,282
Default Re: help for validating forms

nbop,

I tend to disagree. 1- what happens if javascript is turned off? 2- PHP is a server side script and therefore the validation/security measures are unseen which makes it harder to hack.

While I agree that javascript can do the job- it has it's limitations.

As to the re-load, using the back button or a return to previous page button will keep all previously entered content in the form fields.

Just another point of view.

Cheers,

Andy
__________________
My diamond in the rough - www.123gpp.com

* Click here for some BV tutorials (Php mailto Form, I-Frames, Picture display and much, much more!)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old 07-05-2006, 02:30 AM
Andy128's Avatar
Major General
 
Join Date: Dec 2005
Location: Michigan
Posts: 2,282
Default Re: help for validating forms

chandni-

What e-mail address would you have the form info sent to?

Have you resolved this issue?

Andy
__________________
My diamond in the rough - www.123gpp.com

* Click here for some BV tutorials (Php mailto Form, I-Frames, Picture display and much, much more!)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old 07-05-2006, 10:42 AM
Corporal
 
Join Date: Jun 2006
Location: Belgium
Posts: 10
Default Re: help for validating forms

@andy128: well i don't think his form has to be extremely secure and if he wants to use php he would have to learn regex. This is harder then the javascript solution. You can always force the user to allow javascript.
The best way is using javascript and php. But I think php is a little to hard for chandni. I wouldn't pay someone to make a script for me but search for a solution myself. This way you learn and save money. (It does use time :p)


@chandi: try google. Search for php regular expressions.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old 07-05-2006, 12:03 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,346
Default Re: help for validating forms

If your main job does not allow you the time to do it yourself, then Watdaflip's Form Scripting Service is the best solution. I've been writing scripts for many members, including validation and upload. Your script is relatively easy, but only if you have some experience.

nbop: ANY form that sends an email, is a potential spammer target. Even a simple Tell a Friend form. Chances are less than 5% that a form may actually be hijacked, but why risk?
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old 07-05-2006, 02:51 PM
Corporal
 
Join Date: Jun 2006
Location: Belgium
Posts: 10
Default Re: help for validating forms

Lol so u want to protect form hijacking with validating it's input? If you want to protect against hijacking you need to use php: sessions or cookies. But for simply checking if a form is empty, email is vailid, numer is number you can use javascript. This way is faster (page dosn't need to actually be submitted or reloaded) so user friendlier.
Owja you might want to use a captcha (you know, an image with contents that you need to type in a textbox) against bot spam.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old 07-05-2006, 03:07 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,346
Default Re: help for validating forms

nbop: I think we have a missunderstanding here. Form security has been an issue during the last two months - obviously you weren't around at that time. If you were you would have seen that we are talking excactly about php, and, since we should use it for that purpose, we might as well use it for validation also.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


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

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

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


All times are GMT +1. The time now is 04:02 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC7
2005-2009 VodaHost Web Hosting Your Perfect Web Host - All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176