Notice: Undefined index: submit in C:\Program Files\Apache Group\Apache2\htdocs\test.php on line 27
which is this line if($_POST['submit'] != false)
and this is the submit its referring to:
<input type = "submit" name = 'submit' value = 'Expand'/>
any ideas why it won't work please?
Undefined Index (won't go away)
Moderator: General Moderators
- Templeton Peck
- Forum Commoner
- Posts: 45
- Joined: Sun May 11, 2003 7:51 pm
not meaning to hijack someone elses thread... but im having the same problem
(this is being a rather bad night for me
)
i have this:
and the error is:
Notice: Undefined index: 'username' in c:\program files\apache group\apache\htdocs\stuff\lite\include\userbadconf.php on line 37
Notice: Undefined index: 'sitename' in c:\program files\apache group\apache\htdocs\stuff\lite\include\userbadconf.php on line 38
Notice: Undefined index: 'adminemail' in c:\program files\apache group\apache\htdocs\stuff\lite\include\userbadconf.php on line 38
Notice: Undefined index: 'adminemail' in c:\program files\apache group\apache\htdocs\stuff\lite\include\userbadconf.php on line 38
so hows come im getting undefined index on index's that have just been used without an error?
i have this:
Code: Select all
<?php
$message = str_replace("<#c_id#>",AddSlashes($id),$message);
$message = str_replace("<#c_name#>",AddSlashes($HTTP_POST_VARS['rlname']),$message);
$message = str_replace("<#c_nick#>",AddSlashes($HTTP_POST_VARS['username']),$message);
$message = str_replace("<#c_country#>",AddSlashes($countries[$HTTP_POST_VARS['country']]),$message);
$message = str_replace("<#c_icq#>",AddSlashes($HTTP_POST_VARS['icq']),$message);
$message = str_replace("<#c_email#>",AddSlashes($HTTP_POST_VARS['email']),$message);
$message = str_replace("<#c_password#>",AddSlashes($HTTP_POST_VARS['pass1']),$message);
$message = str_replace("<#c_sitename#>",$setupvars['sitename'],$message);
$message = str_replace("<#c_siteurl#>",$setupvars['siteurl'],$message);
$message = str_replace("<#c_adminemail#>",$setupvars['adminemail'],$message);
$message = str_replace("<#c_forums#>",$setupvars['forums'],$message);
$subject = "Registration confirmation For User $HTTP_POST_VARS['username']"; //******line 37
mail($HTTP_POST_VARS['email'],$subject,$message,"From:$setupvars['sitename'] <$setupvars['adminemail']>\nReplyTo:$setupvars['adminemail']");
?>Notice: Undefined index: 'username' in c:\program files\apache group\apache\htdocs\stuff\lite\include\userbadconf.php on line 37
Notice: Undefined index: 'sitename' in c:\program files\apache group\apache\htdocs\stuff\lite\include\userbadconf.php on line 38
Notice: Undefined index: 'adminemail' in c:\program files\apache group\apache\htdocs\stuff\lite\include\userbadconf.php on line 38
Notice: Undefined index: 'adminemail' in c:\program files\apache group\apache\htdocs\stuff\lite\include\userbadconf.php on line 38
so hows come im getting undefined index on index's that have just been used without an error?
- Templeton Peck
- Forum Commoner
- Posts: 45
- Joined: Sun May 11, 2003 7:51 pm
- Templeton Peck
- Forum Commoner
- Posts: 45
- Joined: Sun May 11, 2003 7:51 pm
Coco: You're trying to nest string literals byorinstead
But I'm still puzzledI'm quite sure this gave a parse error not long ago....
try$subject = "Registration confirmation For User $HTTP_POST_VARS['username']";
Code: Select all
$subject = "Registration confirmation For User $HTTP_POST_VARS[username]";Code: Select all
$subject = 'Registration confirmation For User '. $HTTP_POST_VARS['username'];But I'm still puzzled
Code: Select all
<?php
$arr = array("'test'" => 'valid');
echo "since when is this $arr['test'] ?";
?>