Redirecting PHP query to text box

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
Khorask
Forum Newbie
Posts: 6
Joined: Fri Apr 28, 2006 10:14 am

Redirecting PHP query to text box

Post by Khorask »

Just a quick question...
how would you direct the results of a query to a text box ?

thanks
someberry
Forum Contributor
Posts: 172
Joined: Mon Apr 11, 2005 5:16 am

Post by someberry »

Code: Select all

<?PHP
$result = mysql_query("SELECT `x` FROM `x`") or die(mysql_error());
$get = mysql_fetch_assoc($result);

echo('<input type="text" name="x" value="' . $get['x'] . '" />');
?>
Khorask
Forum Newbie
Posts: 6
Joined: Fri Apr 28, 2006 10:14 am

Post by Khorask »

Yeah, the results...

thanks heaps
Post Reply