Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2007
    Posts
    137
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Use of undefined constant

    this is the error am getting
    even thought the name email n message are from the text fields and the method used is POST
    i am getting this error.
    can someone please help me
    Code:
    Notice: Use of undefined constant name - assumed 'name' in C:\Program Files\EasyPHP\www\mcms\modules\guestbook\index.php on line 14
    
    Notice: Use of undefined constant email - assumed 'email' in C:\Program Files\EasyPHP\www\mcms\modules\guestbook\index.php on line 14
    
    Notice: Use of undefined constant message - assumed 'message' in C:\Program Files\EasyPHP\www\mcms\modules\guestbook\index.php on line 14
    here is the line 14
    Code:
    f((!$_POST[name]) || (!$_POST[email]) || (!$_POST[message])) {
     echo " Please Fill Up all Fields ".'<br /><a href="javascript:history.go(-1)">'."Click Here".'</a>';
     exit;
    }
    here is the forum which passes the information
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    </head>
    <body>
    <form action="index.php" method="post">
    <input name="action" type="hidden" value="1">
      <div>Name*</div>
      <div>
        <input class="textfield" type="text" name="name" size="20" maxlength="30"/>
      </div>
      <div>Email*</div>
      <div>
        <input class="textfield" type="text" name="email" size="20" maxlength="30"/>
      </div>
      <div>Message*</div>
      <div>
        <textarea class="textfield" name="message" cols="20" rows="4" wrap="virtual"></textarea>
      </div>
      <div>
        <input type="submit" name="submit" value="Sign GuestBook" />
        <input type="reset" name="submit" value="Reset"/>
      </div>
      <div>* required fields</div>
    </form>
    </body>
    </html>
    But the mysql query is taking place n database has been updated.
    still am gettign this problem
    Last edited by hmvrulz; 05-01-2008 at 06:13 AM.

  • #2
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    Missing quotes:
    $_POST['name']

    good luck.

  • #3
    Regular Coder
    Join Date
    Jan 2007
    Posts
    137
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Brandoe85 View Post
    Missing quotes:
    $_POST['name']

    good luck.
    thanx a lot mate


  •  

    Posting Permissions

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