Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Help needed with PHP Contact Form

  1. #11
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    Just put the variable between the textarea tags:

    Code:
    <textarea name="message"><?=$smessage?></textarea>
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  2. #12
    Join Date
    Apr 2006
    Posts
    205
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by alexjewell View Post
    Just put the variable between the textarea tags:

    Code:
    <textarea name="message"><?=$smessage?></textarea>
    Ok! I've tried that in the same code I posted above and it's not working. I've also tried.
    Code:
    <textarea name="message"><?$smessage?></textarea>
    ...but that didn't work either. I'm clueless!


  3. #13
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    Hmmm...that's so weird :/

    I'm clueless on that one. It should work...ha.

    The one thing I see is the code you posted above is:

    Code:
    <textarea name="message"><?$smessage?></textarea>
    It should be:

    Code:
    <textarea name="message"><?=$smessage?></textarea>
    If that doesn't work, I'm not entirely sure...


    The other thing, and thanks to Twey for pointing this out to me, is in the code you posted, you have:

    PHP Code:
    //If the name and email are something other than nothing...
    if($name != "" $tel != "" $email != "" $message != "" ) { 
    You should use "&&", not "&":

    PHP Code:
    //If the name and email are something other than nothing...
    if($name != "" && $tel != "" && $email != "" && $message != "" ) { 
    That doesn't seem to be shooting back any errors...but I would make it right to just, well, have it right.
    Last edited by alexjewell; 06-24-2007 at 01:44 AM.
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

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
  •