Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

putting data in text boxes 1

Status
Not open for further replies.

taval

Programmer
Jul 19, 2000
192
GB
Hi,

I was wondering how I could get data from a database and put the data into text boxes.

for example I have a form like:

------------------------------

<form name=&quot;thisForm&quot; action=&quot;registration.php&quot; method=&quot;POST&quot; onSubmit=&quot;return validateForm(this);&quot; >
<input type=&quot;text&quot; size=24 name=&quot;Name&quot; >
</form>

----------------

and I wish to put the value of $row[&quot;Name&quot;] into the text box.

Thanks.

 
I'm not sure I'm correct but you could try something like:

<input type=&quot;text&quot; size=24 name=&quot;Name&quot; value='<?=$row[&quot;Name&quot;]?>'>
 
you're correct, but just a remark.

don't use single quotes. Use double ones.

value=&quot;<?=$row[&quot;Name&quot;]?>&quot; cause if you have a single quote inside the text you're not going to see what you expect. Well with doble ones, it's the same problem, but you can always transform them in &quote;
Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top