Page 1 of 1

Redirecting PHP query to text box

Posted: Mon May 01, 2006 3:45 am
by Khorask
Just a quick question...
how would you direct the results of a query to a text box ?

thanks

Posted: Mon May 01, 2006 3:57 am
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'] . '" />');
?>

Posted: Mon May 01, 2006 3:58 am
by Khorask
Yeah, the results...

thanks heaps