我点击提交按钮后文件没有被写入

file not being written after I hit submit button

 <?php
 if(isset($_POST['submit_btn']))
 /////code here//////
 /////the program actually gets inside this if statement after the user submits login info

 if(strpos(file_get_contents("accounts.txt"),$text) !== false) : ?>

 /////html form displays here...and the submit button name of the form is submitbtn//////
<input type="submit" name="submitbtn" value="Submit" onclick="giveaway()">

 <?php endif; ?>    

 <?php
 if(isset($_POST['submitbtn']))
 //////the content here never runs, regardless if I click submit or not/////

有谁知道为什么当我点击表单的提交按钮时,后面的 php 代码没有 运行?它永远不会进入 if 语句

错别字:submit_btn 对比 submitbtn

<?php
 if(isset($_POST['submitbtn']))
 /////code here//////
 /////the program actually gets inside this if statement after the user submits login info

 if(strpos(file_get_contents("accounts.txt"),$text) !== false) : ?>

 /////html form displays here...and the submit button name of the form is submitbtn//////
<input type="submit" name="submitbtn" value="Submit" onclick="giveaway()">

 <?php endif; ?>    

 <?php
 if(isset($_POST['submitbtn']))
 //////the content here never runs, regardless if I click submit or not/////