7 P0 t) P4 d: @* p$ m1 ~6 Ffunction InitForm(){ & Q3 S6 P+ m2 }$ |+ e6 I" ~. X0 |//layout for the form: {3 q) D6 w' z; G p j) W
echo "<strong>Send Items.</strong>$ A1 U4 _/ l- C- T
<form name='select' method='post'>6 V$ _, I+ t, \) d& g! P
<lable>Character Name</lable><br/># S( g) T9 P k$ T/ C; [$ [! D
<input type='text' name='char'/><br/>. s% I' T2 s8 M3 \7 o6 K, D y
<lable>Item Name (Needs to be Exact or can use Item ID.)</lable><br/>0 b3 S5 E- r; M0 r( x- G- E' d
<input type='text' name='item_name'/><br/> % g: f5 @& e9 Z2 e0 D<lable>Item Amount</lable><br/> ) B1 J( [! T" F# s0 X<input type='text' name='item_amount'/><br/> 9 b* C: |+ B+ `1 P$ W4 A<lable>Item Upgrade Amount</lable><br/>1 a, _+ Z1 `8 u6 G
<input type='text' name='item_upgrade'/><br/> # g* g4 B; b# N, r5 I3 ^4 ~4 a<lable>Element Type.(0-None, 1-Fire, 2-Water, 3-Electricity, 4-Wind, 5-Earth.)( D: K. r# k; ?4 W
' a& d$ p, u4 _
</lable><br/>5 z# v' w6 i2 R6 k: y
<input type='text' name='item_element'/><br/> ) j' ^& J: s C8 D<lable>Element Upgrade Amount</lable><br/>! r; M% ?/ @; f8 h/ c
<input type='text' name='element_upgrade'/><br/>+ M0 \1 a7 {# b6 [9 ?
<lable>Pierced Amount</lable><br/> 3 Q3 g9 o8 q3 h' z6 Y/ ^+ b5 S<input type='text' name='item_pierce'/><br/> ' F- w7 H! R+ z& F* p5 W3 K6 ]<input type='submit'/>. M# B" i" q t/ D
</form>"; . K+ f3 I3 m% H}6 ?: B A4 f. T2 W! E6 S7 E- ^
7 \! i e# {/ r( }- W/ @- E& Gfunction PostListener (){; ]) I m# K b) h8 C% S
//Add more post variables if needed and add them to initform() function aswell8 p# L8 T8 ]0 K" X0 K" e
( ?( Z7 \* N9 U. f' \ j################################3 h {- C6 C* e7 H+ ?
##### Connection and Post ###### H, g+ {; W, V x
################################3 `, ` ]$ K$ r( ^
$name = @$_POST['char'];0 f) x3 J( {6 R$ X3 h+ ^( X9 C
$ItemName = @$_POST['item_name'];8 M* ]+ g! U$ W/ ^% s3 Y+ P
$ItemAmount = @$_POST['item_amount']; 8 u2 u! |1 B) W4 {& y/ W9 B( N$ItemId = @$_POST['item_id']; 2 i' ~, T! Q7 x2 p% ~3 B6 B$ItemUpgrade = @$_POST['item_upgrade'];) C3 D- o5 e, ^; G% ?
$ItemElement = @$_POST['item_element'];2 ~0 w% q+ Q+ i
$ElementUpgrade = @$_POST['element_upgrade'];2 s3 L' [# y' z6 a, u- P
$ItemPierce = @$_POST['item_pierce'];& s* ?- }: b# U `, T
################################ 5 g0 C" m& U" g6 J9 X1 @- X$ E9 p0 K# O4 t3 M' @1 B
//Check both variables for empty value ' Q* K7 P9 _4 b5 x9 z - m1 C6 n$ {& f7 ?# U3 kif (!empty($_POST['char'])){ `5 O; @, [$ s8 J$find = mssql_query("select * from [CHARACTER_01_DBF].[dbo].[CHARACTER_TBL] where ! W' B; m/ f" B/ X+ w5 I2 x+ O ( b- l) a$ R" D1 z# Y" Om_szName = '{$name}'"); $ _; x6 _" v7 O( p$ u. l8 Xwhile ($row = mssql_fetch_object($find)){& a' V2 f) i* E% x: ~
echo "You Just Sent {$ItemAmount} {$ItemName}(s) to {$name}<br>"; 3 v9 A5 X) X, {4 t; Z$ k! ] c" e$logs = mssql_query("INSERT INTO CHARACTER_01_DBF.dbo.ITEM_SEND_TBL([m_idPlayer], , _3 ], Z& i0 ]# X' l& J7 P; Y+ H2 \$ y
- Q! r, x' Q) S+ a# `* I/ a, [
[serverindex], [Item_Name], [Item_count], [idSender], [m_nAbilityOption], & d4 L2 S6 ~: Y _2 p+ v- a