Skip to content

Instantly share code, notes, and snippets.

@meoooh
Last active December 20, 2015 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meoooh/6153671 to your computer and use it in GitHub Desktop.
Save meoooh/6153671 to your computer and use it in GitHub Desktop.
<?php
$id = $_GET['id'];
$pw = $_GET['pw'];
$sql = "select id, pwdcompare('$pw', pw) as pw
from user
where user = '$id'"; //pwdcompare(): http://msdn.microsoft.com/ko-kr/library/dd822792.aspx
$result = mssql_query($sql);
$row=mssql_fetch_array($result);
if($row[pw] == 1){
//로그인 성공
}
else{
//로그인 실패...
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment