0

I am working on a PHP website project. The website runs fine. But I am getting Notice Errors like this:

Notice: Undefined index: process in C:\xampp\htdocs\myphpproject\index.php on line 9

Now this is Line 9 in the index.php:

if($_POST['process']=='true') {few if statements and SQL queries are here}

Eventhough my website works fine but I have a lot of these notice errors. What is the problem in the above code and how can I avoid the mistakes that cause these kind of notice errors?

P.S. I already know that I can hide them but I prefer to fix them instead of hiding them :)

Thank you

Irfana
  • 231
  • 3
  • 11
  • Since it's marked dupe by John, I cannot post an answer. But here's the answer: Change your if to: `if (isset($_POST['process']) && $_POST['process'] == true) { //stuff }` – matrixdevuk Oct 07 '14 at 01:53
  • Thank you @matrixdevuk. I used your comments and it works :) – Irfana Oct 07 '14 at 02:23
  • There is a rating button next to my comment if you hover over it, press that if you want. @MaryJane – matrixdevuk Oct 07 '14 at 02:38
  • @matrixdevuk, as I see there is no button next to your comment. Or maybe there is and I can not find it. Sorry, new user :) – Irfana Oct 07 '14 at 02:53

0 Answers0