Hi..Im new to this forums and im new to PHP...I just want to release this maybe some people might need it..Its not really good, so those people who are pro already with PHP bare with me.. xD
Script
Screenshot
You need to make a login page for Admins so that not all people can access this script in your website if you use it..
Just discover how to use it..Its so easy...
Script
<title>Dpoints Page</title>
<font face="Courier New">
<center>
<h6>
<?php
function Connect() {mssql_connect('\SQLEXPRESS','SA','*YOURPASSWORD*') or die('Error: Connection to DB Failed.');
}
function InitForm(){
echo "Adding Dpoints<br>
<form name='character' method='post'>
<lable>Account Name</lable><br/>
<input type='text' name='account'/><br/>
<lable>Number Of Dpoints</lable><br/>
<input type='text' name='auth'/><br/>
<input type='submit'/>
</form>
<br>Dpoints Check<br />
<form name='select' method='post'>
<lable>Account Name</lable><br/>
<input type='text' name='char2'/><br/>
<input type='submit'/>
</form>";
}
function PostListener (){
$init = Connect();
$account = @$_POST['account'];
$auth = @$_POST['auth'];
$name = @$_POST['char'];
$name2 = @$_POST['char2'];
if (!empty($_POST['account']) && !empty($_POST['auth'])){
$query = mssql_query("update [ACCOUNT_DBF].[dbo].[ACCOUNT_TBL] set cash
= '{$auth}' where account = '{$account}'");
echo "{$account} Has Now '{$auth}' Dpoints";
}
if (!empty($_POST['char2'])){
$Auth = mssql_query("select * from [ACCOUNT_DBF].[dbo].[ACCOUNT_TBL] where
account = '{$name2}'");
while ($row = mssql_fetch_object($Auth)){
echo "{$name2} Currently Have '$row->cash' Dpoints";
}
}
}
$InitForm = InitForm();
$Listener = PostListener();
?>
</h6>
</center>
</font>
<font face="Courier New">
<center>
<h6>
<?php
function Connect() {mssql_connect('\SQLEXPRESS','SA','*YOURPASSWORD*') or die('Error: Connection to DB Failed.');
}
function InitForm(){
echo "Adding Dpoints<br>
<form name='character' method='post'>
<lable>Account Name</lable><br/>
<input type='text' name='account'/><br/>
<lable>Number Of Dpoints</lable><br/>
<input type='text' name='auth'/><br/>
<input type='submit'/>
</form>
<br>Dpoints Check<br />
<form name='select' method='post'>
<lable>Account Name</lable><br/>
<input type='text' name='char2'/><br/>
<input type='submit'/>
</form>";
}
function PostListener (){
$init = Connect();
$account = @$_POST['account'];
$auth = @$_POST['auth'];
$name = @$_POST['char'];
$name2 = @$_POST['char2'];
if (!empty($_POST['account']) && !empty($_POST['auth'])){
$query = mssql_query("update [ACCOUNT_DBF].[dbo].[ACCOUNT_TBL] set cash
= '{$auth}' where account = '{$account}'");
echo "{$account} Has Now '{$auth}' Dpoints";
}
if (!empty($_POST['char2'])){
$Auth = mssql_query("select * from [ACCOUNT_DBF].[dbo].[ACCOUNT_TBL] where
account = '{$name2}'");
while ($row = mssql_fetch_object($Auth)){
echo "{$name2} Currently Have '$row->cash' Dpoints";
}
}
}
$InitForm = InitForm();
$Listener = PostListener();
?>
</h6>
</center>
</font>
Screenshot
You need to make a login page for Admins so that not all people can access this script in your website if you use it..
Just discover how to use it..Its so easy...