+ Reply to Thread
Results 1 to 2 of 2




  

Thread: About dropdownlistbox selecting items??

      
  1. #1
    Jedi Master realistic is on a distinguished road
    Join Date
    November 5, 2008
    Location
    London
    Posts
    162
    Rep Power
    4
    Feedback Score
    0

    Question About dropdownlistbox selecting items??

    I have a table containing three fields Name, city, Marks

    If I select name filed in dropdownlist box I want the rest of the fields to be displayed in Text boxes.

  2. #2
    Jedi Master sandeep Kumar is on a distinguished road
    Join Date
    June 24, 2010
    Location
    India
    Posts
    35
    Rep Power
    2
    Feedback Score
    0

    Default Re: About dropdownlistbox selecting items??

    form name :-> form_db.php

    Code:
    <?php
    if(isset($_POST['posted'])=='true')
    {
    $connect=mysql_connect('localhost','root','');
    $db=mysql_select_db('dir_db',$connect);
    
    // Now We Perform Search Operation, that main logic for that Query,that perform opertion for only when we select the Name from drop down List and in table we specify only one row data.		
                   
    if(isset($_POST['required_select'])== 'Name' )
    {
    $query=mysql_query("SELECT * FROM table_name", $connect);
    while($row = mysql_fetch_array($query))
    {
    $column1=$row['name'];
    $column2=$row['city'];
    $column3=$row['marks'];
    }
    					
    }
    }
    ?>
    
    <form name="form" method="post" action="form_db.php">
     <select name="required_select">
               <option value="Name">Name</option>
               <option value="City">City</option>
               <option value="Marks">Marks</option>
        </select-->
         <b>City :</b>
    <input type="text" name="city" value="<?php echo $column2; ?>" size="25">
        <b>Marks :</b>
    <input type="text" name="marks" value="<?php  echo $column3; >"size="25">
    <input type="hidden" name="posted" value="true" />
    </form>

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Replies: 11
    Last Post: Aug 11th, 2009, 7:53 am
  2. Google items
    By Hot Spot Just 4 in forum Google
    Replies: 2
    Last Post: Jan 18th, 2009, 8:33 pm
  3. Upgrading some items
    By grim in forum Feedback and Support
    Replies: 0
    Last Post: Dec 22nd, 2008, 7:24 am
  4. Digital items
    By webster13045 in forum HTML & Website Design
    Replies: 0
    Last Post: Jan 14th, 2008, 1:10 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
WebTalkForums
WebTalkForums
Recent Forum Threads