Results 1 to 4 of 4

Thread: Can't Get Textarea to display default value

  1. #1
    Join Date
    Jul 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Can't Get Textarea to display default value

    I can't seem to get the script
    Code:
    $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.
    Last edited by Snookerman; 08-10-2009 at 05:43 PM.

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Is PHP enabled on your server? Does the file have the .php extension?

  3. #3
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    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.

  4. #4
    Join Date
    Jul 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Stupid me

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •