I don't wanna be rude but I don't really like this: "Credits to Diumelia for SOME pieces of the script.".
I highlighted everything that I wrote in red and everything that you wrote (actually changed) in blue. Do you see the difference? I think you better write there: "Credits to me, Cuvvvie, for some parts of the script.".
But anyways, thanks for mentioning my name..
Code:
<body>
<font face="Geneva, Arial, Helvetica, Sans-Serif">
<font size="3">
<?php
//This script was created by Cuvvvie, credits to Diumelia for some pieces of the script.
ini_set('display_errors', 0);
$connection = mssql_connect('**YOURHOST**', 'sa', '**YOURPASSWORD**'); //Replace YOURHOST and YOURPASSWORD
if(!connection || !mssql_select_db('CHARACTER_01_DBF', $connection))
{
die('Unable to connect or select database!');
}
$checkusername = $_POST['character'];
$query = mssql_query("UPDATE CHARACTER_TBL SET m_chAuthority = 'S' WHERE m_szName = '$checkusername'");
$result = mssql_fetch_row($query);
if(isset($_POST['submit'])){
if($_POST['character'] == ""){
$error = '<font color="red"><b>Please enter a username.</b></font>';
}
else{
mssql_query("UPDATE CHARACTER_TBL SET m_chAuthority = 'S' WHERE m_szName = '$checkusername'");
$error = '<font color="green"><b>Youhave been succesfully changed to a GM!</b></font>';
}
}
echo '<form action="creategm.php" method="post">';
echo 'Character Name: <input type="text" name="character" /><br /><br />';
echo '<input type="submit" name="submit" value="Become a GM!">
echo '</form>';
echo $error
?>
</body>