retrieve multiple record data from mysql database and store it on separate dynamic cr

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • navsa
    New Member
    • Feb 2016
    • 1

    retrieve multiple record data from mysql database and store it on separate dynamic cr

    I have multiple records in mysql database,but i need to fetch all the records from db and store it on seperate dynamic created form.please help me guyz its urgent..
    Code:
    id name
    1  aaa
    2  bbb 
    3  ccc
    4  ddd
    <?php
    $sql = "select * from table";
    $query=mysql_query($sql);
    while($row=mysql_fetch_array($query))
    {
    id=$row[id];
    name=$row[name];
    }
     how to store it on dynamic created textbox in php.
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    Not an elegant solution, but you should learn to dig around:
    Code:
    while($row=mysql_fetch_array($query))
    {
    ?>
    <FORM href='somepage.php' method='POST|GET'>
    <INPUT name="id" value="<?=$row['id']?>">
    <INPUT name="name" value="<?=$row['name']?>">
    <INPUT type="SUBMIT" value="Submit Change">
    </FORM>
    }

    Comment

    Working...