Hello Balaji,

Thursday, July 26, 2001, 2:24:09 PM, you wrote:

BA> Hi! Dear friends,

BA>      How to display the values in HTML FORM by retrieving the values from database.

BA> Please any one of u know suggest me.

BA> Thanks in advance.

BA> ----------------------------------------------------------------------------

BA> <?php

BA> // Connect to MySQL

BA>     mysql_connect( 'localhost', 'balaji', 'pingpong' )
BA>         or die ( 'Unable to connect to server.' );

BA>     // Select database on MySQL server

BA>     mysql_select_db( 'imac' )
BA>         or die ( 'Unable to select database.' );


BA> <BODY background="imacbg1.gif">

BA> <form method="POST" action="modifyuser.php">
BA> <div align="center">
BA> <center>
BA> <h2>Modify User</h2>
BA> <p>
BA> <script language="php">

BA>     $query = "SELECT * from employee WHERE emp_id='$user' "; // $user will come 
from post method
BA>     $result = mysql_query($query)or die ( 'Unable to execute query.' );


BA> </script>
 Employee No:      <input type="text" name="emp_id" value="<? echo
 $row["emp_id"]; ?>">
  Name       :   <input type="text" name="emp_name" value="<? echo
  $row["emp_name"]; ?>">

  and some another values like that
 I hope it helps
Best regards,
 Daniel                            mailto:[EMAIL PROTECTED]

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to