我试图让我的查询结果像这样显示。
here here here
here here here
here here here
...等等
但无论我尝试什么,他们最终都会这样..
Here
Here
Here
Here
你得到了图片......老实说,我已经尝试了一切,但我无法让它发挥作用。
这是代码请忽略我的错误编码:/
<div class="box">
<div style="width: 90%; margin: 0 auto; text-align: center;">
<div style="width: 33%; float: left;">
<?php
$result = mysql_query("SELECT * FROM user_pokemon WHERE belongsto='". $_SESSION{'username'}."'AND (slot='0')");
while($row = mysql_fetch_array($result))
{
$sql2 = "SELECT * FROM pokemon WHERE name='".$row['pokemon']."'";
$result2 = mysql_query($sql2) or die(mysql_error());
$battle_get2 = mysql_fetch_array($result2);
echo '<img src="pokemon/'.$row['type'] .''.$battle_get2['pic'].'" border=0>
</a>' ;
$idd= mysql_real_escape_string($row['id']);
$iddd = strip_tags($idd);
?>
<form name="slot1" action="" method="post">
<p>
<select name="A" id="" >
<option value="1">Slot 1</option>
<option value="2">Slot 2</option>
<option value="3">Slot 3</option>
<option value="4">Slot 4</option>
<option value="5">Slot 5</option>
<option value="6">Slot 6</option>
</select>
<input type="hidden" name="token" id="token" value="<?php echo $iddd ; ?>" />
<br />
<input type="submit" class="submit" value="Add to Team" name="slot1">
</p>
</form>
<?php
echo $row['pokemon'];
?>
<p></p>
<?php
echo "Level:";
echo $row ['level'];
?>
<p></p>
<?php
echo "Gender:";
echo $row['gender'];
echo "<br />";
}
?>
</div>
</div>
</div>
这是我拥有的CSS。
.box {
width: 90%;
background-color: #eaebd8;
border: 1px solid #00008B;
margin: 0 auto 10px;
padding: 10px;
}
所以如果我能得到一些帮助,我将非常感激:)