Page 1 of 1

retrieving display

Posted: Thu Aug 03, 2006 7:19 am
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

Posted: Thu Aug 03, 2006 7:21 am
by anjanesh

Code: Select all

<input type="text" name="whatever" value="<?php echo $query_result['fieldname']; ?>"/>

Posted: Thu Aug 03, 2006 7:37 am
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]