Jump to content

Retrieve Data


frisiandi

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...