Jump to content

write2keith

New Members
  • Posts

    1
  • Joined

  • Last visited

write2keith's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi there I am trying to create a search form to retrive rates form multiple selections and then display the results. i have created the database in mysql database name: Rates in that there are the following 6 tables:- 1.Country 2.Area 3.Region 4.destination 5.airline 6.rate_table 1)The country has the following columns:- Country_code,Country_name,Area and Region 2)The Area table has the following columns:- Area_code,Area name and Country 3)The Region table has the following coulumns:- Region_Code,Region_Name and Country 4)The destination has the following columns:- Dest_Code,Dest_Name and Dest_Country 5. The Airline Table has the following columns:- Airline_Code and Airline_Name 6) The Rates Table has the following columns:- Rate_ID,Rate_Airline,Rate_Destination and Rate I managed to create my first drop down using the code below:- <?php //create connection $connectmysql=mysql_connect("localhost","root","root"); if (!$connectmysql) { die('Not Connected :' . mysql_error()); } $db_selected=mysql_select_db('rates',$connectmysql); ?> <?php $result = mysql_query("SELECT Country_Name FROM Country ORDER BY Country_Name") or die(mysql_error()); while ($row=mysql_fetch_array($result)) { $Country_Name=$row["Country_Name"]; $options.='<option value="'.$row['Country_Name'].'">'.$row['Country_Name'].'</option>'; }; ?> <html> <body> <SELECT NAME=catid> <OPTION VALUE=0>choose</option> <?php echo $options;?> </SELECT> </HTML> the stucture plannned is country-->region--->Area--->destination--->Airline and then search. if the country is selected then the next drop down should show the region automatically in the next dropdown and for the area drop down.The destination drop down should only show destinations for the county selected and the airline should only show the list of airlines. then the rate results should show based on these cliterias. Thanks and Regards Keith
  2. Hello everyone!!! I have just started php programming a week and i am hoping to get a lot of help from this forum to enhance my skills. At first a first glance i found php very confusing but after looking through the forums and writing some scripts i have found it very interesting.I have never programed much in my carrier and am more of a network admin. I have done some visual basic programming and asp programs about 10 years back.but after all these years trying to start programing again i knew it will be tough. Yesterday i had did my first complex code on php with connecting to the mysql database and displaying those results in a drop down selection in html.though none of this code was written by me as i got it from the forums. Hoping that by having joined this website i will be able to boost up my skills as a php programmer and also understand how the code worked.And then be able to write my very own code. Thanks and Regards Keith
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.