473,549 Members | 2,935 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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..
Expand|Select|Wrap|Line Numbers
  1. id name
  2. 1  aaa
  3. 2  bbb 
  4. 3  ccc
  5. 4  ddd
  6. <?php
  7. $sql = "select * from table";
  8. $query=mysql_query($sql);
  9. while($row=mysql_fetch_array($query))
  10. {
  11. id=$row[id];
  12. name=$row[name];
  13. }
  14.  how to store it on dynamic created textbox in php.
  15.  
Feb 1 '16 #1
1 1985
johny10151981
1,059 Top Contributor
Not an elegant solution, but you should learn to dig around:
Expand|Select|Wrap|Line Numbers
  1. while($row=mysql_fetch_array($query))
  2. {
  3. ?>
  4. <FORM href='somepage.php' method='POST|GET'>
  5. <INPUT name="id" value="<?=$row['id']?>">
  6. <INPUT name="name" value="<?=$row['name']?>">
  7. <INPUT type="SUBMIT" value="Submit Change">
  8. </FORM>
  9. }
Apr 28 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4351
by: ameshkin | last post by:
I know this is probably not too hard to do, but how do I display multiple rows of a mysql query/recordset. Im having trouble doing this. I don't just want to display them, but I want to make sure ONE field in each row gets a variable. The table name is RecentUploads, the field I want to pull is XML This is probably something simple that...
1
2575
by: bettor | last post by:
Hi all, I have set up a database where people enter their personal details. I would like to program a button/link when clicked on to pull one random record from the database and display it. the picked is the winner. Thanks in advance for your help.
2
2065
by: zek2005 | last post by:
Hi! I have a value loaded in a database as following: &lt;p&gt;&lt;strong&gt;test&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;test 2&lt;/ strong&gt;&lt;em&gt;&lt;strong&gt;questions&lt;img alt=&quot;&quot; src=&quot;http://www.mysite.com/fckeditor/editor/images/smiley/msn/ regular_smile.gif&quot;...
11
10791
by: nse111 | last post by:
<?php //header('Content-Type: image/jpeg'); header('Content-Type: text/html'); @mysql_connect("localhost","root","dba") or die("Error"); @mysql_select_db("gallery"); $result = mysql_query("SELECT * FROM paintings"); while($row = mysql_fetch_assoc($result)){ print $row."</br>"; //print $row; }
1
4587
by: javediq143 | last post by:
Hi All, This is my first post in this forum. I'm developing a CMS for my latest website. This CMS is also in PhP & MySQL. I'm done with the ADD section where the Admin can INSERT new records in Database but I'm stuck in the EDIT. I'm getting 2 problems over here. Below is the description: 1)The FIRST page will list all the records from the...
2
4797
by: Nilanjan Sanyal | last post by:
how to retrieve hindi text from mysql database using php
1
2567
by: Gunasegar | last post by:
I need to retrieve an image from mysql database, where it is already stored as longblob format pls help me
1
2633
by: apssiva | last post by:
Hi, how? id,username,subject 1,AAAA, EnglishI 1,AAAA, MathsI 1,AAAA, MathsII 1,AAAA, EnglishII
0
7518
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7446
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7956
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7469
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7808
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6040
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5087
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1057
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.