set textbox value with php
Posted: Tue Apr 15, 2008 9:51 pm
Hi there
I have a textbox in my php page like this
Now I have another php function
After searching to mysql, I want to setup a value in my textbox radius1 inside the function valueInsert. However, it is not working. I guess I am making confusion with server end and client end concept. Can anyone help me to get it right. If not php, how can I populate my textbox after searching a data from mysql?
I have a textbox in my php page like this
Code: Select all
<li><B>1.</B> planetlab1.cs.uchicago.edu [University of Chicago]:
<br><input type="text" id="radius1" style="width:50px;" title="Type your radius in km" value="0"/>kmCode: Select all
function valueInsert($tname, $tdist){
echo "<br>From valueInsert<br>";
echo $tname;
if ($tname=="planetlab1.cs.uchicago.edu")
document.getElementById("radius1").value=$tdist;
}