retrieving display

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
shiranwas
Forum Commoner
Posts: 53
Joined: Fri Jul 07, 2006 10:41 pm
Location: Colombo

retrieving display

Post by shiranwas »

Hi,,

I am having a HTML page with 3 text fields

i know how to retrive corrosponding values if some one entered a text to the first text field using PHP
BUT i do not know to show in existing text fields the values i retrived from the query .

please help me

thanx

shiran
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Code: Select all

<input type="text" name="whatever" value="<?php echo $query_result['fieldname']; ?>"/>
User avatar
shiranwas
Forum Commoner
Posts: 53
Joined: Fri Jul 07, 2006 10:41 pm
Location: Colombo

Post by shiranwas »

this is what i want

Code: Select all

<?php
$jobno=$_POST['txtJobNo'];	
	include('Conn.php');	
	$sql="select * from complains where jobno='$jobno'";
	$result=mysql_query($sql) or die ("error");	
		
	if (!$result)
	{
		die ("Could not query the database: <br />". mysql_error());
	}				
								
	$row = mysql_fetch_array($result, MYSQL_ASSOC) ;
					
//here i want to show the values i got  from the query ,in the HTML page ('complaintrdata.htm') where it has 2 existing text boxes one named as 'subject ' and other named as 'personname'

include('complaintrdata.htm');	
}
?>
feyd | missed the correct ending tag for

Code: Select all

[/color]
Post Reply