Log in

View Full Version : Resolved Can't Get Textarea to display default value



boxelder_bee
08-10-2009, 04:50 PM
I can't seem to get the script


$i="insert text here";

<td><textarea rows="10" cols="50" name="company_desc"> <?php echo $i; ?> </textarea></td>


Only returns <?php echo $i; ?> in the text box. I can't seem to get it to execute the script. Any help would be appreciated.

Snookerman
08-10-2009, 04:57 PM
Is PHP enabled on your server? Does the file have the .php extension?

Schmoopy
08-10-2009, 05:02 PM
As long as your code isn't exactly as you've put it, it should work.

Your code lacks <?php ?> around the $i variable. But not sure if you left them out accidentally.

This code does work perfectly if the PHP is running correctly.

boxelder_bee
08-10-2009, 05:36 PM
I am such a noob. haha I just relized I kept uploading the profileinfo.php instead of profileinfo.html, when it was the .html one I was working on. Thanks so much for the help.