php - Undefined index error : codec why its giving error nothing changes happen in database -


can explain me did wrong please, if using error_reporting show no error nothing happen database

<?php  //error_reporting(e_error | e_parse);   include ("db.php"); $codec=$_post['code'];   if(isset($_post['code']) && !empty($_post['code']))  {      $search = mysql_query("select code,active users code='".$codec."'  , active='0'") or die(mysql_error());       $match  = mysql_num_rows($search);       if($match > 0)      {          mysql_query("update users set active='1' code='".$codec."' , active='0'") or die(mysql_error());          echo '<div class="statusmsg">your account has been activated, can login</div>';      }       else      {          // no match -> invalid url or account has been activated.          echo '<div class="statusmsg">the url either invalid or have activated account.</div>';      }  }  ?>   

you having problem here... change line ...

if(!isset($_post['code']) && !empty($_post['code'])) 

to

if(isset($_post['code']) && !empty($_post['code'])) 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -