Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $UpdateN = 'INSERT INTO notes (uid, staff_name, name, alias, note_text, warning)'
- . ' VALUES ( ?, ? , ? , ? , ? , ? )';
- if( $sth = mysqli_prepare($dbcon,$UpdateN) ) {
- mysqli_stmt_bind_param($sth,'ssssss'
- ,$_POST['hidden']
- ,$user
- ,$player->name
- ,$player->aliases
- ,$_POST['note']
- ,$_POST['warn']
- );
- if( mysqli_stmt_execute($sth) ) {
- // statement execution successful
- } else {
- printf("Error: %s\n",mysqli_stmt_error($sth));
- }
- } else {
- printf("Error: %s\n",mysqli_error($dbcon));
- }
- $UpdateN2 = 'UPDATE players SET warning = warning + ? WHERE playerid = ? ';
- if( $sth2 = mysqli_prepare($dbcon,$UpdateN2) ) {
- mysqli_stmt_bind_param($sth2,'ss'
- ,$_POST['warn']
- ,$_POST['hidden']
- );
- if( mysqli_stmt_execute($sth2) ) {
- // statement execution successful
- } else {
- printf("1Error: %s\n",mysqli_stmt_error($sth2));
- }
- } else {
- printf("2Error: %s\n",mysqli_error($dbcon));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement