problem text

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

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

problem text

Post by shiranwas »

hi,

what i really want is the value i got form the query, to show in a html page with existing text control called txtLastName
this is my html document

<html>
<body>
<form method="POST" action="complaintrdata.php">
<input name="txtJobno" type="text" style="color: #000; background: #EFEFEF; border: 2px solid #781351">
<!-- I WANT THE VALUE TO BE APPEARED HERE in txtLastName-->
<input name="txtLastName" type="text" style="color: #000; background: #EFEFEF; border: 2px solid #781351">
<input type="submit" name="cmdOK" value="OK" >

</form>
</body>
</html>

this is my PHP

php:


<?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) ;


include('complaintrdata.htm');
}
?>
PLEASE HELP ME


SHIRAN
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You've got a thread on this already. Use it. Image
Locked