Page 1 of 1

values for existing contols

Posted: Sat Jul 08, 2006 12:41 am
by shiranwas
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


hi,

 I have alredy created a php page as follows, I want to pasa a value from function to a existing
control how to do that, please help me.

Code: Select all

<html>
<body>

<?php

function a(){
$h="localhost";
$p="shiran";
$u="root";

$dbh=mysql_connect($h,$u,$p) or die("Can not connect to the server");

mysql_select_db("call");

$result= MYSQL_QUERY("Select * from call_details" );

$row=mysql_fetch_ASSOC($result);

return($row['refno']) ;


}

?>

<input type="text" name="ref"  />

</html>
</body>
thanks

shiran


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Sat Jul 08, 2006 8:19 am
by feyd
Write the return value into the control's value.