을 제출하면 제출 버튼이 표시되지 않습니다. 등록 양식을 만들었고 등록을 눌러야 만 제외하고 모든 것이 정상적으로 작동합니다. 등록을 다시해야하지만 그 이유는 알 수 없습니다. 내가 그것을 여기 나 좀 도와주십시오 참조 그나마 사촌 코드의 실수 .. 내가 등록 버튼 (등록/로그인 시스템 PHP)
input.php
register.php:
<?php
require_once 'core/init.php';
if(input::exists()) {
echo 'Submitted';
}
?>
<form action="" method="">
<div class="field">
<label for="username">Username</label>
<input type="text" name="username" id="username" value="" autocomplete="off">
</div>
<div class="field">
<label for="password">Create a password</label>
<input type="password" name="password" id="password">
</div>
<div class="field">
<label for="password_again">Enter your password again</label>
<input type="password" name="password_again" id="password_again">
</div>
<div class="field">
<label for="name">Enter your password again</label>
<input type="text" name="name" id="name">
</div>
<input type="submit" value="Register"
:
<?php
class input {
public static function exists($type = 'post') {
switch($type) {
case 'post':
return (!empty($_POST)) ? true : false;
break;
case 'get':
return (!empty($_GET)) ? true : false;
break;
default:
return false;
break;
}
}
}
및
init.php<?php
session_start();
$GLOBALS ['config'] = array(
'mysql' => array(
'host' => '127.0.0.1',
'username' => 'root',
'password' => '',
'db' => 'lr'
),
'remember' => array(
'cookie_name' => 'hash',
'cookie_expiry' => 604800
),
'session' => array(
'session_name' => 'user'
)
);
spl_autoload_register(function($class) {
require_once 'classes/' . $class . '.php';
});
require_once 'functions/sanitize.php';
?>
를 게시물을 넣어 잊어하지만 여전히 나는 내 업데이트 대답 확인 – lenart95
버튼을 누를 때 제출 한 텍스트를 가져니까. –