Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 06, 2016, 12:06:09 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: PHP Database help.  (Read 4060 times)

Davidtheo

  • Participant
  • Joined in 2008
  • *
  • Posts: 119
    • View Profile
    • Donate to Member
PHP Database help.
« on: May 11, 2009, 11:05:53 PM »
I am trying to create a php page that has 2 drop down lists and a search box, the drop down list are filled via database.

for exmlpe My database can be something like.

Table 1
Subject ID
Subject

Table 2
Subject ID
paper ID
Paper

Table 3
Subject ID
Paper ID
Title
Des

Drop down box 1 will be filled from Table 1 (subject)
Drop down box 2 is filled from Table 2 based on what subject is selected in Drop down box 1
when a search word is entered into the search box then table 3 is searched based on the search box and what is selected in down down boxes 1 and 2
the search result is displayed in a different page as links, the link when clicked  displays the Full record that is in table 3.

Can someone please tell me how to or help me do this?

Thanks

Davidtheo

  • Participant
  • Joined in 2008
  • *
  • Posts: 119
    • View Profile
    • Donate to Member
Re: PHP Database help.
« Reply #1 on: May 13, 2009, 12:00:24 AM »
ok It looks this this can't be done in PHP so I am now looking at ASPX, can anyone help he with this?

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: PHP Database help.
« Reply #2 on: May 13, 2009, 03:10:47 PM »
How far did you look until you came to that conclusion?

Davidtheo

  • Participant
  • Joined in 2008
  • *
  • Posts: 119
    • View Profile
    • Donate to Member
Re: PHP Database help.
« Reply #3 on: May 13, 2009, 08:10:02 PM »
How far did you look until you came to that conclusion?

I have spend two days four days before posting this topic and an other two day after posting it just trying to find out this first part.

"Drop down box 1 will be filled from Table 1 (subject)
Drop down box 2 is filled from Table 2 based on what subject is selected in Drop down box 1"

Note: I am trying to do this first part on one page.

I have already found a way I can do this with ASPX using updatepanel but I have not coded it yet, as I am now trying to work out now to connect ASPX using C# to a database. This is proving to be harder in C# and ASPX.

Kirth

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
Re: PHP Database help.
« Reply #4 on: May 24, 2009, 08:50:12 AM »
ok It looks this this can't be done in PHP so I am now looking at ASPX, can anyone help he with this?

Lies and falsehood.  You'd be using AJAX for this -- which includes PHP & JavaScript.  Honestly, if there'se something you cán do with ASP(x), then you can count on the fact that you can do it with PHP also.

Davidtheo

  • Participant
  • Joined in 2008
  • *
  • Posts: 119
    • View Profile
    • Donate to Member
Re: PHP Database help.
« Reply #5 on: May 24, 2009, 08:22:59 PM »
OK How would this be done in PHP???? IF I can do this in PHP I do not need to change my server account to MS.

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 7,986
    • View Profile
    • Dales Computer Services
    • Donate to Member
Re: PHP Database help.
« Reply #6 on: May 25, 2009, 04:27:30 AM »
Have you checked this out using google?

http://www.google.co...amp;client=firefox-a

Lots of items listed that look like they do what you want - including complete drop down menu scripts for free.

The following look like good starts:

http://www.scriptdun...ript/freescripts1010 - it says it now includes MySQL stuff but I didn't check that out. See http://www.steo.it/php/dropdownmenu0.6/ for the download and there is a demo version of the menu at the top of the page.

http://www.coremedia...p_down_menu_php.html - uses arrays to generate drop down menus - just fill the array from your MySQL data

You will have to modify any of the scripts to read your database entries and insert the read values into the script.

Don't wish to be funny but I found these scripts within 30 seconds of looking?