Change Name PHP

01/03/2015 23:58 st.jimmy998#1
If someone have it, please can send me? I need this mainly for my GM.. Thanks
01/05/2015 08:08 JujiPoli#2
Ofc it not complete but it will help you to make php alone ;O


Code:
You can change the 'value =' here:

Old Charname:<br/><input type="text" name="character" value="<?php echo $character1; ?>"><br/>
New Charname:<br/><input type="text" name="charname" value="<?php echo $character1; ?>"><br/>

Code:
$sql = "SELECT CharID
                   FROM [PS_GameData].[dbo].[Chars]
                   WHERE CharName = ?";
	$stmt = odbc_prepare($GLOBALS['dbConn'],$sql);
	$args = array($character);
	odbc_execute($stmt,$args);
	'<br/>';
	$CharID = odbc_result($stmt,'CharID');
Code:
$sql = "UPDATE [PS_GameData].[dbo].[Chars] SET Charname = ? where CharID = ?";
 $stmt = odbc_prepare($GLOBALS['dbConn'],$sql);
 $args = array($charname,$CharID);
 odbc_execute($stmt,$args);