ok here's the html form
PHP Code:
<?php
$var= @$_GET['id'];
$trimmed = trim($var);
$limit=10;
if ($trimmed == "") {
echo"<p>Please enter a search...</p>";
exit;
}
if (!isset($var)) {
echo "<p>There is no search parameter...</p>";
exit;
}
mysql_connect("localhost","username","password");
mysql_select_db("ketocon_quila") or die("Unable to select database");
$query = "SELECT * FROM Items2 WHERE id LIKE \"%$trimmed%\" ORDER by id";
$result = mysql_query($query);
echo '<form action="edit_form.php" method="post">';
echo '<table border="2" width="5000" cellspacing="0" cellpadding="3">';
echo "<tr>";
echo '<th width="8">DBID</th>';
echo '<th width="12">SoD Item ID</th>';
echo '<th width="4">Tier</th>';
echo '<th width="255">ItemName</th>';
echo '<th width="4">AC</th>';
echo '<th width="4">STR</th>';
echo '<th width="4">STA</th>';
echo '<th width="4">DEX</th>';
echo '<th width="4">AGI</th>';
echo '<th width="4">CHA</th>';
echo '<th width="4">WIS</th>';
echo '<th width="4">INT</th>';
echo '<th width="4">HP</th>';
echo '<th width="4">Mana</th>';
echo '<th width="4">MR</th>';
echo '<th width="4">FR</th>';
echo '<th width="4">CR</th>';
echo '<th width="4">PR</th>';
echo '<th width="4">DR</th>';
echo '<th width="6">FT</th>';
echo '<th width="6">CrtStr</th>';
echo '<th width="6">MdShld</th>';
echo '<th width="6">StnRes</th>';
echo '<th width="6">DmgRed</th>';
echo '<th width="6">Aggr</th>';
echo '<th width="6">SplWrd</th>';
echo '<th width="12">Instrument</th>';
echo '<th width="6">InsMod</th>';
echo '<th width="12">BaneType</th>';
echo '<th width="6">BneDmg</th>';
echo '<th width="12">SkillMod</th>';
echo '<th width="6">ModAmt</th>';
echo '<th width="255">FocusEffect</th>';
echo '<th width="255">SpellEffect</th>';
echo '<th width="6">WpnDmg</th>';
echo '<th width="6">WpnDly</th>';
echo '<th width="6">WpnTyp</th>';
echo '<th width="6">Ear</th>';
echo '<th width="6">Neck</th>';
echo '<th width="6">Head</th>';
echo '<th width="6">Face</th>';
echo '<th width="6">Chest</th>';
echo '<th width="6">Back</th>';
echo '<th width="6">Arms</th>';
echo '<th width="6">Shldrs</th>';
echo '<th width="6">Wrist</th>';
echo '<th width="6">Waist</th>';
echo '<th width="6">Hands</th>';
echo '<th width="6">Fingers</th>';
echo '<th width="6">Legs</th>';
echo '<th width="6">Feet</th>';
echo '<th width="6">Primry</th>';
echo '<th width="6">Secdry</th>';
echo '<th width="6">Range</th>';
echo '<th width="6">Ammo</th>';
echo '<th width="6">Charm</th>';
echo '<th width="6">T2 Aug</th>';
echo '<th width="6">T3 Aug</th>';
echo '<th width="6">T5 Aug</th>';
echo '<th width="255">Mob</th>';
echo '<th width="4">BRD</th>';
echo '<th width="4">BST</th>';
echo '<th width="4">CLR</th>';
echo '<th width="4">DRU</th>';
echo '<th width="4">ENC</th>';
echo '<th width="4">MAG</th>';
echo '<th width="4">MNK</th>';
echo '<th width="4">NEC</th>';
echo '<th width="4">PAL</th>';
echo '<th width="4">RNG</th>';
echo '<th width="4">ROG</th>';
echo '<th width="4">SHD</th>';
echo '<th width="4">SHM</th>';
echo '<th width="4">WAR</th>';
echo '<th width="4">WIZ</th>';
echo "</tr>";
while ($row=mysql_fetch_array($result)) {
?>
<tr>
<td><? echo $row['id']; ?></td>
<td><input type="number" name="soditemid" size=6 value="<? echo $row['soditemid']; ?>" /></td>
<td><input type="number" name="tier" size=4 value="<? echo $row['Tier']; ?>" /></td>
<td><input type="text" name="itemname" size=80 value="<? echo $row['ItemName']; ?>" /></td>
<td><input type="number" name="itemac" size=5 value="<? echo $row['AC']; ?>" /></td>
<td><input type="number" name="itemstr" size=5 value="<? echo $row['STR']; ?>" /></td>
<td><input type="number" name="itemsta" size=5 value="<? echo $row['STA']; ?>" /></td>
<td><input type="number" name="itemdex" size=5 value="<? echo $row['DEX']; ?>" /></td>
<td><input type="number" name="itemagi" size=5 value="<? echo $row['AGI']; ?>" /></td>
<td><input type="number" name="itemcha" size=5 value="<? echo $row['CHA']; ?>" /></td>
<td><input type="number" name="itemwis" size=5 value="<? echo $row['WIS']; ?>" /></td>
<td><input type="number" name="itemint" size=5 value="<? echo $row['INT']; ?>" /></td>
<td><input type="number" name="itemhp" size=5 value="<? echo $row['HP']; ?>" /></td>
<td><input type="number" name="itemmana" size=5 value="<? echo $row['Mana']; ?>" /></td>
<td><input type="number" name="itemmr" size=5 value="<? echo $row['MR']; ?>" /></td>
<td><input type="number" name="itemfr" size=5 value="<? echo $row['FR']; ?>" /></td>
<td><input type="number" name="itemcr" size=5 value="<? echo $row['CR']; ?>" /></td>
<td><input type="number" name="itempr" size=5 value="<? echo $row['PR']; ?>" /></td>
<td><input type="number" name="itemdr" size=5 value="<? echo $row['DR']; ?>" /></td>
<td><input type="number" name="itemft" size=5 value="<? echo $row['FT']; ?>" /></td>
<td><input type="number" name="itemcs" size=5 value="<? echo $row['CS']; ?>" /></td>
<td><input type="number" name="itemms" size=5 value="<? echo $row['MS']; ?>" /></td>
<td><input type="number" name="itemsr" size=5 value="<? echo $row['SR']; ?>" /></td>
<td><input type="number" name="itemdmgr" size=5 value="<? echo $row['DmgR']; ?>" /></td>
<td><input type="number" name="itemaggr" size=5 value="<? echo $row['Aggr']; ?>" /></td>
<td><input type="number" name="itemsw" size=5 value="<? echo $row['SpellWard']; ?>" /></td>
<td><input type="text" name="instrument" size=15 value="<? echo $row['Instrument']; ?>" /></td>
<td><input type="number" name="instrumentmod" size=5 value="<? echo $row['InstrumentMod']; ?>" /></td>
<td><input type="text" name="banetype" size=15 value="<? echo $row['BaneType']; ?>" /></td>
<td><input type="number" name="banedmg" size=5 value="<? echo $row['BaneDmg']; ?>" /></td>
<td><input type="text" name="skillmod" size=15 value="<? echo $row['SkillMod']; ?>" /></td>
<td><input type="number" name="skillmodamt" size=5 value="<? echo $row['SkillModAmt']; ?>" /></td>
<td><input type="text" name="focuseffect" size=80 value="<? echo $row['FocusEffect']; ?>" /></td>
<td><input type="text" name="spelleffect" size=80 value="<? echo $row['SpellEffect']; ?>" /></td>
<td><input type="number" name="weapondmg" size=5 value="<? echo $row['WeaponDmg']; ?>" /></td>
<td><input type="number" name="weapondly" size=5 value="<? echo $row['WeaponDly']; ?>" /></td>
<td><input type="text" name="weapontype" size=15 value="<? echo $row['WeaponType']; ?>" /></td>
<td><input type="checkbox" name="earslot" <? echo ($row['earslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="neckslot" <? echo ($row['neckslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="headslot" <? echo ($row['headslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="faceslot" <? echo ($row['faceslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="chestslot" <? echo ($row['chestslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="backslot" <? echo ($row['backslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="armslot" <? echo ($row['armslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="shoulderslot" <? echo ($row['shoulderslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="wristslot" <? echo ($row['wristslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="waistslot" <? echo ($row['waistslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="handslot" <? echo ($row['handslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="fingerslot" <? echo ($row['fingerslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="legslot" <? echo ($row['legslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="feetslot" <? echo ($row['feetslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="prislot" <? echo ($row['prislot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="secslot" <? echo ($row['secslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="rangeslot" <? echo ($row['rangeslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="ammoslot" <? echo ($row['ammoslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="charmslot" <? echo ($row['charmslot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="aug2slot" <? echo ($row['aug2slot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="aug3slot" <? echo ($row['aug3slot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="aug5slot" <? echo ($row['aug5slot'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="text" name="Mob" size=80 value="<? echo $row['mob']; ?>" /></td>
<td><input type="checkbox" name="brdclass" <? echo ($row['brdclass'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="bstclass" <? echo ($row['bstclass'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="clrclass" <? echo ($row['clrclass'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="druclass" <? echo ($row['druclass'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="encclass" <? echo ($row['encclass'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="magclass" <? echo ($row['magclass'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="mnkclass" <? echo ($row['mnkclass'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="necclass" <? echo ($row['necclass'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="palclass" <? echo ($row['palclass'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="rngclass" <? echo ($row['rngclass'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="rogclass" <? echo ($row['rogclass'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="shdclass" <? echo ($row['shdclass'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="shmclass" <? echo ($row['shmclass'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="warclass" <? echo ($row['warclass'] ? 'checked="checked"' : ''); ?> /></td>
<td><input type="checkbox" name="wizclass" <? echo ($row['wizclass'] ? 'checked="checked"' : ''); ?> /></td>
<td><input name="update" type="submit" id=<? echo ($row['id']); ?> value="Update"</td>
</tr>
<?
}
?>
</form>
</table>