Hi there, I'm trying to modify a form verification script. When you press the submit button it runs a javascript function that checks if the required fields are filled out. If not it sends up an alert and doesn't submit the form. What I'd like to do is have it also check that a certain field isn't all ready in the database. Is there a way for me to pass a javascript var to an sql query? I know client side vs. server side so there probably isn't an easy way to accomplish this?
dyingatmidnight
0
Junior Poster
Recommended Answers
Jump to PostTo fit with your program flow, you probably need to use Ajax as mentioned in the previous post. In a simple situation, you can use some Javascript to pass variables to PHP by calling a PHP program with parameters. An example of passing the screen dimensions to PHP:
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.