0

check if the field value exists in the database by javascript

Is it possible?

maybe something like this ..

search = mysql_query("SELECT * FROM table3 WHERE name = 'name' AND title = 'title'");
if(@mysql_num_rows(search) > 0){
1
  • 4
    Server is server, JavaScript is client. You need for example AJAX Commented Apr 12, 2013 at 13:06

1 Answer 1

1

It is IMPOSSIBLE to comunicate with any type of server in javascript. IMPOSSIBLE don't even try to search something. You need other languages like php ( reccomended ), java, asp... Check tutorials for connecting with php:

PHP mssql server connection tutorial

Sign up to request clarification or add additional context in comments.

1 Comment

While this is true, it's worth pointing out that ajax is not a separate language from javascript -- ajax is (among other things) a technique in the javascript language for interacting with server-side scripts. As is, your answer could be a bit confusing to the uninitiated...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.