Setting the text

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
richcoleuk
Forum Newbie
Posts: 24
Joined: Fri Nov 05, 2004 1:33 pm

Setting the text

Post by richcoleuk »

I have a text field on my page, its name it first. I want to set the text of this box with something. How do i do this?

In terms of C# or something i would use:

first.text = "Hello";

im looking to do the same sort of thing.
snicolas
Forum Commoner
Posts: 97
Joined: Tue Nov 09, 2004 8:32 am

Post by snicolas »

You can do

$firsttext = "hello";

<input type="text" value="<?php echo $firsttext?>">

s
Post Reply