Click to See Complete Forum and Search --> : Validation help?


Lux
09-28-2003, 07:19 AM
I'm rather new to web building and i could use a little help with building an e-mail validation script.

I've used dreamweaver to create a web page, it does a post to a field within an SQL db, this works fine.

What i have to do now is validate that this post (or entry) appears against another field within another table of my db. If the value is true (i.e. their e-mail address matches one i have in my db, it sends them a mail using xp_sendmail, again this bit works fine) what i need to do is if this entry is not found, i need to run an alert function to display a message)

I have no idea how to do this, can anyone point me in the right direction?

Thanks in advance.

Khalid Ali
09-28-2003, 09:23 AM
it sounds like you are using some sort of server side scripting...what you will need to do is create an HTML response...what server side language are you using....

Lux
09-28-2003, 01:50 PM
Not really...I'll explain.

I've created a table within SQL, given it a few fields, one of these is the e-mail address. I do a post using a connection DSN on the web server (built using dreamweaver).

I then run a trigger using T-SQL, that runs whenever a new entry is added to this database, this in turn e-mails the users address that was entered, depending if there e-mail address is valid, i.e. exists in my db, (I use inner joins against my entry table used for the post and the other table that holds all my user info) to validate the e-mail address depends on the e-mail they receive (i have 2 seperate mails that can be sent).

All the above works fine, but i don't know how to run either an SQL stored procedure, or launch the trigger from the web page...i know how to validate entries in SQL, just no idea how to do it with java?

Maybe im trying to make something easy very complicated, if theres a way of doing this all using java, let me know?

Khalid Ali
09-28-2003, 11:35 PM
You already are using some sort of server side scripting,because I don't understadn how you can communicate with webserver from an HTML page.

Anyways..if you know java then your worries are over,you can create a servlet and call your stored procedures using java code...you will need to use Tomcat servlet/jsp engine