RonenMymon Posted May 7, 2006 Share Posted May 7, 2006 I have like 4 notice messages:Notice: Undefined index: CName in c:\Inetpub\wwwroot\Test\phpDatabase.php on line 17Notice: Undefined index: CEmail in c:\Inetpub\wwwroot\Test\phpDatabase.php on line 18Notice: Undefined index: CTextArea in c:\Inetpub\wwwroot\Test\phpDatabase.php on line 20Notice: Undefined index: CFlag in c:\Inetpub\wwwroot\Test\phpDatabase.php on line 21But I've defined the varibels before:17: $NewName = $_REQUEST["CName"];18: $NewEmail = $_REQUEST["CEmail"];19: $NewDate = date('Y-m-d G:i:s');20: $NewMessage = $_REQUEST["CTextArea"];21: $flag = $_REQUEST["CFlag"];What can be the problem ??(The code is working...)Thanks !Ronen Quote Link to comment Share on other sites More sharing options...
Barand Posted May 7, 2006 Share Posted May 7, 2006 I'm assuming there is a form sending this data to your page and when you load the page to display the form you get these messages.If no data has yet been sent to the page from the form then $_REQUEST["CName"] does not yet exist.Try[code]if (isset($_REQUEST["CName"])) { $NewName = $_REQUEST["CName"]; $NewEmail = $_REQUEST["CEmail"]; $NewDate = date('Y-m-d G:i:s'); $NewMessage = $_REQUEST["CTextArea"]; $flag = $_REQUEST["CFlag"]; # process form data here}[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.