Edit a file inside database in php -


when submit button pressed,the isset($_post['ta'] works,but file not updated inside database '---------'. suggestion going wrong?

if ( isset( $_post['ta'] ) ) {     $handle = fopen('saw42.textgrid', "a");     require('db_connection.php');     fwrite( $handle, "-----------");     fclose( $handle ); } 

try this

if(isset($_post['ta'])){       $handle=fopen('saw42.textgrid',"a");     require('db_connection.php'); // don't know why line here     if ($handle===false){         echo 'unable open file';     }else{         fwrite($handle,"-----------");         fclose($handle);     }  } 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -