Jump to content

kristy7

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kristy7's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi Thanks for your reply, maybe I should make my question clearer. I have three separate user select drop down menus which are linking to the db fine. I really I have no idea how to display the data based on what the user has selected from the drop downs and to put it on a separte page. I have fiddled with my code so much now nothing seems to work and I am completly confussed. Do I put the query to select from table where $resulta=$a and $resultb=$b and $resultc=$c below the print statement for the table to display the data or above it, what will send the data from the query to another page?? this gives me my drop down fine when repeated for each selection type $query = "SELECT soiltype FROM soiltype ORDER BY soiltype "; $resulta = mysql_query($query, $dbcnx) or die ("Database query error: " . mysql_error()); while ( $a_row = mysql_fetch_object($resulta) ) { print "<option value='$a_row->soiltype'> $a_row->soiltype \n"; }; print "</select>"; print "</tr>"; print "</table>"; print "</form>"; \\then the submit button <form action="AddList.php" method="post"> <input type="submit" name="Submit" value="Submit" /> </form> \\ then I can't get the query right that will take the three selected variables and return some data. hope this is a little clearer, it is driving me insane, I know what I want to do is not difficult but I just can't seem to work it out
  2. If someone could help with this it would be much appreciated...thanks
  3. Hi All, I am pretty much a newbie when it comes to php and mysql. I am having trouble doing a job for work where I have multiple drop down boxes attached to a mysql database, each linked to a separate table. I want to select an option from each dropdown and generate a query which will search another table that all the dropdown tables are linked to and give me the data selected and print to a new page. I have the dropdowns working I am just not sure how to do the query to incorporate the user selected options and print it to a new page, any help would be much appreciated, this is the gist of what I have so far.... // set up form for selecting required soil type print "<form>"; print "<center>"; print "<table height=20 cellSpacing='0' cellPadding='5' border='2' width='30%' bgColor='#DFF7FF' >"; print "<tr>"; print " <td width='30%'> <font face='Arial' size='2'>Pool Type:</font></td>"; print " <td width='*'>"; print " <select NAME='soil Type' ID='soilType' onChange='displayProcedure(this.form)'> '\n"; print " <option value='nil'> Choose a soil Type .... \n"; // connect and execute query $query = "SELECT soilType FROM soilType ORDER BY soilType "; $resulta = mysql_query($query, $dbcnx) or die ("Database query error: " . mysql_error()); while ( $a_row = mysql_fetch_object($resulta) ) { print "<option value='$a_row->soilType'> $a_row->soilType \n"; }; print "</select>"; print "</tr>"; print "</table>"; print "</form>"; this gives me my dropdown selection of soil type, I also have location and area, this info is linked to tblgrower which is the table I want to query. please help I have been fiddling with this for ages and can not get it, especially sending the result to a new page
  4. [!--quoteo(post=368159:date=Apr 24 2006, 04:28 PM:name=askjames01)--][div class=\'quotetop\']QUOTE(askjames01 @ Apr 24 2006, 04:28 PM) [snapback]368159[/snapback][/div][div class=\'quotemain\'][!--quotec--] first make different computation each. then call header. then call include (include for different computation) to the option... [/quote] I am sorry this doesn't mean anything to me could you please explain.....thankyou
  5. Hi All, I am pretty much a newbie when it comes to php and mysql. I am having trouble doing a job for work where I have multiple drop down boxes attached to a mysql database, each linked to a separate table. I want to select an option from each dropdown and generate a query which will search another table that all the dropdown tables are linked to and give me the data selected and print to a new page. I have the dropdowns working I am just not sure how to do the query to incorporate the user selected options and print it to a new page, any help would be much appreciated, this is the gist of what I have so far.... // set up form for selecting required soil type print "<form>"; print "<center>"; print "<table height=20 cellSpacing='0' cellPadding='5' border='2' width='30%' bgColor='#DFF7FF' >"; print "<tr>"; print " <td width='30%'> <font face='Arial' size='2'>Pool Type:</font></td>"; print " <td width='*'>"; print " <select NAME='soil Type' ID='soilType' onChange='displayProcedure(this.form)'> '\n"; print " <option value='nil'> Choose a soil Type .... \n"; // connect and execute query $query = "SELECT soilType FROM soilType ORDER BY soilType "; $resulta = mysql_query($query, $dbcnx) or die ("Database query error: " . mysql_error()); while ( $a_row = mysql_fetch_object($resulta) ) { print "<option value='$a_row->soilType'> $a_row->soilType \n"; }; print "</select>"; print "</tr>"; print "</table>"; print "</form>"; this gives me my dropdown selection of soil type, I also have location and area, this info is linked to tblgrower which is the table I want to query. please help I have been fiddling with this for ages and can not get it, especially sending the result to a new page
×
×
  • 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.