[PHP] How to display values in HTML form by retriving from database through PHP

2001-07-26 Thread Balaji Ankem



Hi! Dear friends,

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

Please any one of u know suggest me.

Thanks in advance.

CODE(MODIFYUSER.PHP)


?php

// Connect to MySQL

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

 // Select database on MySQL 
server

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

?

HTMLBODY 
background="imacbg1.gif"

form method="POST" action="modifyuser.php"div 
align="center"centerh2Modify 
User/h2pscript language="php"

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

/scriptEmployee No: 
input type="text" name="emp_id" value="//here i want to assign $result-emp_id //"
Name : 
input type="text" name="emp_name" value="//here i want to assign $result-emp_name //"
Password: 
input type="password" name="emp_pass" value=""
Confirm Password: input type="password" name="con_pass" 
value=""
User Type: select name="usertype"  // Here i 
want toselect the option depending upon the value from database, if it is 
S orO.option value="0" 
SELECTEDSelect/optionoption 
value="S"SUPER 
USER/optionoption 
value="O"ORDINARY 
USER/option/select 
input type="button" Value="ADD" input 
type="submit" 
value="Submit"/p/center/div/form/BODY/HTML


Thanks in advance.

Regards
-Balaji

The Information contained and transmitted by this E-MAIL is proprietary to 
Wipro Limited and is intended for  use only by the individual or entity to which 
it is addressed, and may contain information that is privileged, confidential or 
exempt from disclosure under applicable law. If this is a forwarded message, 
the content of this E-MAIL may not have been sent with the authority of the 
Company. If you are not the intended recipient, an agent of the intended 
recipient or a  person responsible for delivering the information to the named 
recipient,  you are notified that any use, distribution, transmission, printing, 
copying or dissemination of this information in any way or in any manner is 
strictly prohibited. If you have received this communication in error, please 
delete this mail  notify us immediately at [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]


Re: [PHP] How to display values in HTML form by retriving from database through PHP

2001-07-26 Thread Daniel Rezny

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 CODE(MODIFYUSER.PHP)
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 HTML
BA BODY background=imacbg1.gif

BA form method=POST action=modifyuser.php
BA div align=center
BA center
BA h2Modify 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.' );

$row=mysql_fetch_array($result);

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,
 Danielmailto:[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]




RE: [PHP] How to display values in HTML form by retriving from database through PHP

2001-07-26 Thread Jon Haworth

 // Connect to MySQL
 
 mysql_connect( 'localhost', 'balaji', 'pingpong' )
 or die ( 'Unable to connect to server.' );


...and you'll be changing your password right about now, I suppose :-)

Cheers
Jon


-- 
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]




Re: [PHP] How to display values in HTML form by retriving from database through PHP

2001-07-26 Thread Balaji Ankem



Hi, friend It is not displaying values.

thanks for u'r reply.

-Balaji

  - Original Message - 
  From: 
  Daniel Rezny 
  To: Balaji 
  Ankem 
  Cc: [EMAIL PROTECTED] 
  Sent: Thursday, July 26, 2001 6:22 
  PM
  Subject: Re: [PHP] How to display values 
  in HTML form by retriving from database through PHP
  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 
  CODE(MODIFYUSER.PHP)BA 
  BA 
  ?phpBA // Connect to 
  MySQLBA mysql_connect( 'localhost', 
  'balaji', 'pingpong' 
  )BA or die ( 'Unable 
  to connect to server.' );BA // Select 
  database on MySQL serverBA 
  mysql_select_db( 'imac' 
  )BA or die ( 'Unable 
  to select database.' );?BA HTMLBA 
  BODY background="imacbg1.gif"BA form method="POST" 
  action="modifyuser.php"BA div align="center"BA 
  centerBA h2Modify User/h2BA 
  pBA script 
  language="php"BA $query = "SELECT * 
  from employee WHERE emp_id='$user' "; // $user will come from post 
  methodBA $result = mysql_query($query)or die ( 
  'Unable to execute query.' 
  ); 
  $row=mysql_fetch_array($result);BA 
  /scriptEmployee 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]

The Information contained and transmitted by this E-MAIL is proprietary to 
Wipro Limited and is intended for  use only by the individual or entity to which 
it is addressed, and may contain information that is privileged, confidential or 
exempt from disclosure under applicable law. If this is a forwarded message, 
the content of this E-MAIL may not have been sent with the authority of the 
Company. If you are not the intended recipient, an agent of the intended 
recipient or a  person responsible for delivering the information to the named 
recipient,  you are notified that any use, distribution, transmission, printing, 
copying or dissemination of this information in any way or in any manner is 
strictly prohibited. If you have received this communication in error, please 
delete this mail  notify us immediately at [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]


Re: [PHP] How to display values in HTML form by retriving from database through PHP

2001-07-26 Thread Balaji Ankem



Hi! friend yes now it is working.

prebiously because of cache problem it didn't 
work.

Thanks a lot.

cheers
-Balaji

  - Original Message - 
  From: 
  Daniel Rezny 
  To: Balaji 
  Ankem 
  Cc: [EMAIL PROTECTED] 
  Sent: Thursday, July 26, 2001 6:22 
  PM
  Subject: Re: [PHP] How to display values 
  in HTML form by retriving from database through PHP
  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 
  CODE(MODIFYUSER.PHP)BA 
  BA 
  ?phpBA // Connect to 
  MySQLBA mysql_connect( 'localhost', 
  'balaji', 'pingpong' 
  )BA or die ( 'Unable 
  to connect to server.' );BA // Select 
  database on MySQL serverBA 
  mysql_select_db( 'imac' 
  )BA or die ( 'Unable 
  to select database.' );?BA HTMLBA 
  BODY background="imacbg1.gif"BA form method="POST" 
  action="modifyuser.php"BA div align="center"BA 
  centerBA h2Modify User/h2BA 
  pBA script 
  language="php"BA $query = "SELECT * 
  from employee WHERE emp_id='$user' "; // $user will come from post 
  methodBA $result = mysql_query($query)or die ( 
  'Unable to execute query.' 
  ); 
  $row=mysql_fetch_array($result);BA 
  /scriptEmployee 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]

The Information contained and transmitted by this E-MAIL is proprietary to 
Wipro Limited and is intended for  use only by the individual or entity to which 
it is addressed, and may contain information that is privileged, confidential or 
exempt from disclosure under applicable law. If this is a forwarded message, 
the content of this E-MAIL may not have been sent with the authority of the 
Company. If you are not the intended recipient, an agent of the intended 
recipient or a  person responsible for delivering the information to the named 
recipient,  you are notified that any use, distribution, transmission, printing, 
copying or dissemination of this information in any way or in any manner is 
strictly prohibited. If you have received this communication in error, please 
delete this mail  notify us immediately at [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]