Jump to content

Retrieve Data


frisiandi
 Share

Recommended Posts

single text box

 <?php $result = mysql_query("SELECT column_name(s) FROM table_name WHERE column_name operator value");        $row = mysql_fetch_array($result);?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>    <head>        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">        <title></title>    </head>    <body>        <form action="" method="post"><input type="text" value="<?php echo $row['column_name'] ?>"/></form>    </body></html>

more then one text box

 <?php require_once 'db.php'; $result = mysql_query("SELECT column_name(s) FROM table_name");        ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>    <head>        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">        <title></title>    </head>    <body>       <?php       while($row = mysql_fetch_array($result)){       echo '<form action="" method="post"><input type="text" value="' . $row['column_name'] . '"/></form>';}?>    </body></html>

<- this one is like the one in that link.Try that it should work.edit- sorry forgot the other codeedit2 - you don't need the form around it

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...