home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Help required with form validation and mySQL

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1808
Discussions: 200,990, Posts: 2,379,890, Members: 246,359
Old January 20th, 2003, 10:06 AM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Jan 2003
Posts: 1
Help required with form validation and mySQL

I have a PHP/mySQL script with which I can add/delete/update the entries name and email.I plan to use this for my site to add the names and email addresses of visitors to my site to my database

The script works fine with regard to creation of the tables in my db and adding/deleting records(a very simple script that can be found in most tutorial sites using PHP/mySQL).

I have a few questions:
(a)How do I validate the form entries for the name and email addresses added in the relevant boxes in the form.I want the form to recognize an invalid entry for an email address(eg,if someone uses #,$,%,^,&,*,(,),+,=,|,\,[,],{,},etc in the email address input or enters the email address without the @ sign or fails to add the domain extension .com,.net,.uk,.org,etc or provides an email address starting with a number).Nothing much can be done about the name though.

(b)How do I make the email field "REQUIRED"?That is,if the visitor chooses to input this form,what do I add to this basic script that instructs to echo an error message if the email field is left blank or is filled in the manner mentioned in (a)?

(c)How must this basic script be in order to detect if the email address entered is already in my database/That is,if a visitor enters the same email address already registered I want the script to echo that this email address is already in the database or if he chooses to delete twice,I want the script to echo the script to echo that the email address does not exist in the database.How do I make the script to check the new entry against all others in the db and echo the desired result?

I'm only a beginner-level PHP/mySQL programmer and so I don't know how to work this script.There are plenty of complete scripts available at some resources,but modifying them to suit my purpose is proving to be tiresome.So I intend to use this simple insert/update/delete script with the above-mentioned validation parts added to it,if someone can come to my assistance.

If someone can even provide me the complete script with these validation aspects included,you can pl email it to <ksureshkumar@fastmail.fm> if the space in this forum proves to be restrictive.
ksuresh is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3077)
Charges against non-tippers dropped.. (20)
Health Care Rationing (12)
Delete an OS (17)
Nvidia GTX 260 problem (10)
Laptop with wireless problem. (12)
windows vista security holes (19)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
Point and Shoot Camera Suggestions. (8)
windows 7 problem (7)
[F@H SPAM 11/16/09] ! 1/2 months to.. (39)
Internet Lost (5)
Recent Discussions
Q9650 vs. Q9550 (2)
Foxconn Blackops x48 MoBo (2)
Desktop Calendar Application (2)
Looking for new motherboard (1)
soundmon.exe (8)
Jedi Academy Problem (3)
Can a page file be "too big".. (1)
Nvidia GTX 260 problem (10)
Point and Shoot Camera Suggestions. (8)
Size after cutting 700Mb file is 2.5 .. (0)
Delete an OS (17)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (39)
windows vista security holes (19)
updating BIOS via winflash, claims fi.. (1)
New Server Configuration Suggestions (0)
cheap gaming laptop? (12)
Unallocated Space (2)
help me pls laptop just stopped worki.. (1)
C# + LINQ Help (7)
Dynex DX E-402 (3)
EVGA 9800 gtx help with finding a goo.. (12)
Multiple Restarts Required at Boot (5)
cell phone won't work (0)
Is the PSU I received dead? (15)
Can't open Word (12)


All times are GMT -4. The time now is 08:52 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



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