...

View Full Version : Use of undefined constant



hmvrulz
05-01-2008, 05:09 AM
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

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

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

<!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

Brandoe85
05-01-2008, 05:15 AM
Missing quotes:
$_POST['name']

good luck.

hmvrulz
05-01-2008, 05:28 AM
Missing quotes:
$_POST['name']

good luck.

thanx a lot mate



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum