// value, you run a Mysql Command to get information about that // Pokemon and you display what ever you want. echo "My Pokemon"; $MyPokemonList = unserialize($MyPokemon); foreach ($MyPokemonList as $MyPoke) { $Pokemon = Mysql_Fetch_Array(Mysql_Query("SELECT * FROM user_pokemon WHERE uid = '" . $MyPoke . "'")); } // These are the Other Person Pokemon. // Here the Pokemon have been unserialized, and put in a foreach // to get each and every value from the array. After you get the // value, you run a Mysql Command to get information about that // Pokemon and you display what ever you want. echo $Other."'s Pokemon"; echo $Other . "'s Pokemon"; $OthersPokemonList = unserialize($OthersPokemon); foreach ($OthersPokemonList as $OthersPoke) { $Pokemon = Mysql_Fetch_Array(Mysql_Query("SELECT * FROM user_pokemon WHERE uid = '" . $OthersPoke . "'")); } ?> </p> <p> </p> </center> </p> </td> </tr> </table> </div> </div> <center><script type="text/javascript"><!--
<th> Nombre Comercial </th> <th> Nombre Fiscal </th> <th> Calle Avenida </th> <th> Ciudad Municipio </th> <th> Codigo Postal </th> <th> Pais </th> <th> Telefono </th> <th> Giro </th> <th> Email </th> <th> Web </th> <th> Auditor Encargado </th> <th> Editar </th> <th> Eliminar </th> <?php while ($row = Mysql_Fetch_Array($datos1)) { ?> <tr> <td> <?php echo $NombreComercial = $row['NombreComercial']; ?> </td> <td> <?php echo $NombreFiscal = $row['NombreFiscal']; ?> </td> <td> <?php echo $CalleAvenida = $row['CalleAvenida']; ?> </td>
echo "<b>Other's Pokemon</b>"; if ($MyPokemon != "N;") { $MyPokemonList = unserialize($MyPokemon); foreach ($MyPokemonList as $MyPokeList) { $Pokemon123 = Mysql_Fetch_Array(Mysql_Query("SELECT * FROM user_pokemon WHERE id = '{$MyPokeList}'")); echo "<br />" . $Pokemon123['name'] . " [" . $Pokemon123['level'] . "] - Exp: ", $Pokemon123['exp']; $update1 = mysql_query("UPDATE user_pokemon SET uid='" . $OtherUserId . "'WHERE id = '" . $MyPokeList . "'"); } } else { echo "<br />None"; } echo "<br /><br /><b>My Pokemon</b>"; if ($OthersPokemon != "N;") { $OthersPokemonList = unserialize($OthersPokemon); foreach ($OthersPokemonList as $OthersPokeList) { $Pokemon12 = Mysql_Fetch_Array(Mysql_Query("SELECT * FROM user_pokemon WHERE id = '{$OthersPokeList}'")); echo "<br />" . $Pokemon12['name'] . " [" . $Pokemon12['level'] . "] - Exp: ", $Pokemon12['exp']; $update12 = mysql_query("UPDATE user_pokemon SET uid='" . $MyUserId . "' WHERE id = '" . $OthersPokeList . "'"); } } else { echo "<br />None"; } echo "<br /><br />Trade Completed Succesfully"; $markdeleted = mysql_query("DELETE FROM Trades WHERE id='{$tradeid}'"); } ?>
echo "<p> </p>"; echo "<p> </p>"; // List of Others Pokemon. // Square Brackets needed to make the Select an Array Of Values. Because // user might select more than 1 Pokemon for Trade. Multiple is set to // multiple, so that the user can hit 'Shift' or 'Ctrl' to select more // than 1 Pokemon. And Size 15 shows first 15 Pokemon, for the rest you // have to scroll down in the select field. The Option of the Select fields // meaning the Pokemon, are being ordered by there Name. So Absol would // come before Charizard. Every Option has a vavlue of the Pokemon ID, // because only the ID is unique and cannot be the same as other Pokemons. echo "There pokemon"; echo "<p> </p>"; echo "<select name = 'OthersPokemon[]' size = '15' multiple = 'multiple'>"; $OthersPokemon = Mysql_Query("SELECT * FROM user_pokemon WHERE uid = '" . $Other . "' ORDER BY name ASC"); while ($Pokemon = Mysql_Fetch_Array($OthersPokemon)) { echo "<option value='" . $Pokemon['id'] . "'>" . $Pokemon['name'] . "EXP: " . $Pokemon['exp'] . " - Level: " . $Pokemon['level'] . "</option>"; } echo "</select>"; // Submit Button and Other Person. // The others Person will be sent along in the form to be saved in the // Database, and the Submit Button will help us send the Form to Created.php echo "<input type = 'hidden' name = 'OtherPerson' value = '" . $Other . "'>"; echo "<input type = 'Submit' value = 'Create Trade' name = 'Create'>"; echo "</form>"; ?> </div> </div>