Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2004
    Posts
    17

    Unanswered: making a web app with PHP

    Well i got referred over here by the asp forum. What i am trying to do is to use my excel database of fish and info about them (Which can be converted to access if need be).

    The columns would be (Phylum, Family, Genus, Species, PIcture Number) for instance.

    I want to set this up in a series of drop-down boxes, and search forms so that it looks like this.

    PAGE

    [Drop down box with choices of Phylum]

    [Drop down box of the choices of families within that Phylum]

    [Drop down box of Genuses in that Family]

    [Drop down box/or search box of the species in that genus]

    After a species is selected, I want it to pop up with all of the corresponding information on it (IE, its latin name, where it is located , what GPS coordinates it was found at, and on the right, I want a picture of it to pop up) I can sort the pictures in any way, I just don't know how to approach it.
    Last edited by jwortley; 06-04-04 at 20:13.

  2. #2
    Join Date
    Feb 2004
    Posts
    29
    jwortley, please show the code where you are getting problem

  3. #3
    Join Date
    Jun 2004
    Posts
    17
    That's the problem I don't know how i should go about coding it.

  4. #4
    Join Date
    Feb 2004
    Posts
    29
    jwortley ok I try it using msaccess. and reply you soon

  5. #5
    Join Date
    Feb 2004
    Posts
    29
    Here is an idea, understand it.
    Code:
    <body>
    <?
    $link_id=odbc_connect("test","","");
    //if($link_id)echo "connection created"; 
    $sql="select * from test1";
    $result=odbc_exec($link_id,$sql);
    //if($result)echo "record retrieve successfully";
    ?>
    
                      <!-- table heading-->
    
    <table summary="heading" bgcolor="#ffccff" border="1" width="100%">
    <tr>
    <td width="20%" align="left"><th>Phylum</th></td>
    <td width="20%" align="center"><th>Family</th></td>
    <td width="20%"><th>Genus</th></td>
    <td width="20%"><th>Species</th></td>
    <td width="20%"><th nowrap>Picture Number</th></td>
    </tr>
    </table>
                        <!--form fror display data to select-->
        <!--display.php page will open when you will select any option--> 
    <form action="display.php" method="post" >
    <table summary="data of table" bgcolor="#ffcccc" border="0" 
    width="100%">
    <tr><td width="20%" >
    <select name="Phylum">
    <?
    while($data=odbc_fetch_array($result))
    {
    ?>
    <option value="<? echo $data['Phylum']?>"><? echo $data['Phylum'];?></option>
    <option  
    <?
    }
    ?>
    </select>
    </td>
    </tr></table>
    <input type="submit" value="show information">
    </form>
    </body>
    here is display.php
    Code:
    <body>
    <?
    switch($_POST['Phylum'])
    {
    case 1:
    {
    echo "on selection no 1 what you want to display.";
    break;
    }
    case 2:
    {
    echo "on selection no 2 what you want to display.";
    break;
    }
    case 3:
    {
    echo "on selection no 3 what you want to display.";
    break;
    }
    default:
    {}
    }
    
    
    ?>
    </body>
    If you have any problem, please post here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •