작동 희망, 그리고가없는 나는 코드 위 내 댓글에서 언급 한 바와 같이 Here
<style type="text/css">
.user { font-weight:900; color: #000; text-decoration: none !important; }
.admin { font-weight:900; color: #F00; text-decoration: none !important; }
</style>
<form action="" method="POST">
Input number and press enter:
</br>User = 0 Admin = 1</br>
<input name="rank" id="rank" type="text" />
</form>
<?php
if (isset($_POST['rank'])) {
$info['rank'] = $_POST['rank'];
if($info['rank'] == 1) { $x= "<a class='admin'>Admin</a>"; }
else { $x= "<a class='user'>User</a>"; }
echo $x;
}
?>
뭔가 다른 곳에서 일어나고, 잘 작동하는 우리가 당신에게 주신 것을 우리는 볼 수 없습니다.
그리고 양식없이.
<style type="text/css">
.user { font-weight:900; color: #000; text-decoration: none !important; }
.admin { font-weight:900; color: #F00; text-decoration: none !important; }
</style>
<?php
$info['rank'] = 1;
if($info['rank'] == 1) { $x= "<a class='admin'>Admin</a>"; }
else { $x= "<a class='user'>User</a>"; }
echo $x;
?>
전체 코드를 방해하지 않고 표시 할 수 있습니까? –
당신이 필요로하는 것은 PHP로 처리됩니다. 코드를 다시 확인하십시오. 제안은 코드 highligh로 IDE를 사용합니다. – SaidbakR
다른 질문을하기 전에 http://whataveyoutried.com을 읽어보십시오 :) –