Page 1 of 1
Drop down from database
Posted: Sat Apr 07, 2012 6:54 am
by flyer101
Hello everyone,
Firstly I would like to say I know I am new to this community and shouldn't be asking help straight away but it is an emergency.
Basically I have a page with a contact form on, simple contact form with name, email, phone, subject, message e.t.c.
What I want to do is add another field which is a drop down menu from a MySQL database.
If you look at:
http://www.av8jet.com/charter.php
You can see in the departures box, when you start typing, a list of airports come up, I want to do the same thing from my database but have next to no experience in php and mysql.
I have looked at their code but can't figure it all out.
Anyone who is willing to help we can pay a small fee but this needs to be done urgently,
Thank you for your time,
Flyer101
Re: Drop down from database
Posted: Sat Apr 07, 2012 7:51 am
by azycraze
Try to use any jquery autosuggestion plugin.
That will ease your problem
Re: Drop down from database
Posted: Sat Apr 07, 2012 7:53 am
by flyer101
I'm sorry, do you think you could elaborate?
I appreciate the help so much!
Thanks,
Flyer101
Re: Drop down from database
Posted: Sat Apr 07, 2012 8:02 am
by azycraze
do you need google like auto suggestion?
Re: Drop down from database
Posted: Sat Apr 07, 2012 8:15 am
by flyer101
yes
Re: Drop down from database
Posted: Sat Apr 07, 2012 8:20 am
by azycraze
just google autosuggestion jquery plugin for new ones or just look here
http://www.9lessons.info/2009/06/autosu ... d-php.html
further help assured!
Re: Drop down from database
Posted: Sat Apr 07, 2012 8:27 am
by flyer101
Thank you, how do I link that to a mySQL database though
Re: Drop down from database
Posted: Sat Apr 07, 2012 8:31 am
by azycraze
edit the config.php or just connect to your database in search.php using mysql_connect()
Re: Drop down from database
Posted: Sat Apr 07, 2012 9:05 am
by flyer101
I am completely new to PhP and mySQL so I have no idea what you mean, sorry.
Re: Drop down from database
Posted: Sat Apr 07, 2012 9:25 am
by azycraze
Pls post your codes so that we can help ....
Also try to learn php basics from w3schools.net or some ebooks
Re: Drop down from database
Posted: Sat Apr 07, 2012 10:09 am
by flyer101
Okay I have done some research and sorted out the auto suggestion thing but the thing i am stuck on is putting my .sql file on to my webserver and creating a table then a search column, how do you create a table in cpanel?
Re: Drop down from database
Posted: Sat Apr 07, 2012 10:43 am
by azycraze
do you have a php testing environment in your computer?
If not,it would be better if you setup one so that you can play with php.
To setup a php environment ,setup xampp in your computer.
here is the link
www.apachefriends.org/en/xampp.html
Re: Drop down from database
Posted: Sat Apr 07, 2012 11:07 am
by Celauran
Virtual Box + LAMP > XAMPP.
That aside, you should have a link to phpMyAdmin available from cPanel. From there, you can copy the contents of your .sql file into the SQL tab, which should create the table for you.
Re: Drop down from database
Posted: Mon Apr 09, 2012 7:22 am
by williamsmith518
edit the config.php or just connect to your database in search.php using mysql_connect()
-----------------------------------------------
Patent tescili