Need Help In form Validation in javascipt

shaz's Avatar, Join Date: Oct 2006
Light Poster
hi my name is shaz and m a student.....i am design a website where i can search for house....

example house type,no of bedrooms, price and are...

my databse is in sql and i am using php language.....i need little healp with the search form validation in javascript....
can anybody help in this......
what i am looking for is how can i do form validation in javascript when i click submit php should retive data from mysql.....


thanks
pradeep's Avatar, Join Date: Apr 2005
Team Leader
I didn't understand the exact nature of validation you require. Kindly explain a bit more.
Do you want to check/match the data with the server before submitting the form?
shaz's Avatar, Join Date: Oct 2006
Light Poster
hi
basically i have a form which is in php and i want to do a form validation in javascript and when we click on submit i want php to show the result which is in mysql...i mean my database is in mysql......


i hope that helps
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Thats very easy dude! I hope you know how to connect to a database with PHP, and brief me about the type of fields you want to validate, and the structure of the form.
Validation using JavaScript and returning results from the MySQL databse, both are fairly simple to implement.
Checkout the PHP and JavaScript forums, you'll find a lot of threads on form validation and database connectivity,retrieval.In case that doesn't help you, let me know, and also post your code snippet.
shaz's Avatar, Join Date: Oct 2006
Light Poster
hi pradeep.i havent done the coding as i am new in javascript and php...m still working on it.....


my forum is sumthing like this

its a search form (they all are drop down menu)


Maximum price,
minimum price,
number of bedrooms,
type of property or land,
post code(: this is whre u type post code)
city(: this is where u type city)
region(: this is where u type region)

when i click on search it should validate the form and then retrives data frpm mysql through php

i have read a book on how to retrive mysql through php will work on it soon.

thanks alot for u help
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Go ahead and try it out yourself, all the best. If you are stuck anywhere, I am just a post away.
shaz's Avatar, Join Date: Oct 2006
Light Poster
hi pardeep
how are u
sorry for botherin u again..
i tried alot but i failed.....
first of all i have got an idea how to validate a form with javascript but the probelm is how can i retrieve data from mysql using php..and what method i am suppose to use....
second thing if i want to install php pr mysql how can i do that ....

thanks alot
shaz
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Hi, Nice to hear from you.
You can install both PHP and MySQL on your PC, to run PHP you'll need a webserver like IIS or Apache. You can get Apache from http://httpd.apache.org/ , IIS comes with Windows and MySQL from http://dev.mysql.com/downloads/. Detailed installation instructions will be provided at the sites.
shaz's Avatar, Join Date: Oct 2006
Light Poster
what is ISS
and second thing when i am tryin to safe my php file.it is cumin as text file...whats the reason is it because i havent got ISS or there is sumthing which i am not doing
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Its not ISS, its IIS (Internet Information Server) which is a web server and comes with Windows.To run php scrips u need to have PHP installed and configured for the web server.