<?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/////