Can't put the whole date in a text box?

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
slipstream
Forum Commoner
Posts: 86
Joined: Fri Apr 19, 2002 8:53 am
Location: Canada

Can't put the whole date in a text box?

Post by slipstream »

I grab the date like this :

$today = date("F j, Y");

then I put it in a text box like this:

echo 'Date <input type="text" name="date" value='.$today.'>';

It works but I only see the month, the day and year doesn't shoe in the text box. However it shows when I echo it. Why?
oldtimer
Forum Contributor
Posts: 204
Joined: Sun Nov 03, 2002 8:21 pm
Location: Washington State

Post by oldtimer »

What is the length of the text box? Like is the month and day running into the right hand side of the box? If so just increase the size of it.

Code: Select all

<input name="textfield" type="text" size="40">
slipstream
Forum Commoner
Posts: 86
Joined: Fri Apr 19, 2002 8:53 am
Location: Canada

Yep

Post by slipstream »

got it, thanks...
Post Reply