Hello i在S.A.R.R.R.A.R.R.R.I.A.A.R.A.R.R.I.A.A.R.A.R.M.A.R.M.A.R.M.M.A.M.A.M.A.M.A.M.M.A.M.A.M.M.在S.R.R.I.A.A.A.R.R.A.R.M.M.C.M.M.M.M.T.A.M.M.A.R.M.M.M.R.M.M.M.M.R.M.M.M.T.M.T.,在S.R.R.R.R.R.R.C.R.R.R.R.M.R.R.M.M.M.M.M.T.R.R.R.M.M.R.M.M.M.M.M.M.M.M.M.M.R.M.M.M.R
我对每一种结果都有一个提子,让用户了解他们想要的东西。 当他们报到提交文件时,Itoni想要提交信息并添加到数据库中。 但是,出于某种原因,当用户点击项目1时,它会把最后一个项目输入数据库,例如项目6? 因此,每6个县就有6个结果和1个提交国。 当用户报界提交第1号项目时,它提交第6号供某些回馈。
<form method="post" action="buydo.php">
<label><br />
<br />
</label>
<p>
<?php
$sql = "SELECT * FROM sell
ORDER BY Pokemon_level ASC";
$res = mysql_query($sql) or die(mysql_error());
while ($v = mysql_fetch_array($res)) {
echo
<div class="auction_box">
<img src="http://myrpg.net/new_rpg/ .$v[ Pokemon_pic ]. " width="100" height="100"><br/>
£ .$v[ price ]. <br/>
<label id="pokemonName .$v[ id ]. "> .$v[ pokemon_name ]. </label><br/>
<label>Level .$v[ Pokemon_level ]. </level><br/>
<label>Exp .$v[ exp ]. </level><br/>
<label>Time Left: ;
echo </label>
<br/>
<input type="hidden" name="Name" value=" .$v[ pokemon_name ]. ">
<input type="hidden" name="level" value=" .$v[ Pokemon_level ]. ">
<input type="hidden" name="vid" value=" .$v[ id ]. ">
<input type="hidden" name="price" value=" .$v[ price ]. ">
<input type="hidden" name="exp" value=" .$v[ exp ]. ">
<input type="submit" id=" .$v[ id ]. " class="buy_submit" value="Buy Now" /> </div> ;
}
?>
</p>
<p> </p>
</form>
That is the select with the submit buttons for each result. Then i insert the info they have chosen.
include config.php ;
session_start() ;
$name = mysql_real_escape_string($_POST[ Name ]);
$Pokemon_level = mysql_real_escape_string($_POST[ level ]);
$idofpokemonsell = mysql_real_escape_string($_POST[ vid ]);
$price = mysql_real_escape_string($_POST[ price ]);
$exp = mysql_real_escape_string($_POST[ exp ]);
$sql = "SELECT * FROM `users` WHERE `username` = " . $_SESSION[ username ] . " ";
$result = mysql_query($sql) or die(mysql_error());
$values = mysql_fetch_array($result);
echo $values[ money ] ;
if ( $values[ money ] == $price ) {
echo "Give them the pokemon yay";
}
if ( $values[ money ] > $price ) {
mysql_query("INSERT INTO `user_pokemon` (`pokemon`, `belongsto`, `exp`, `slot`, `level`) VALUES ( $name , " . $_SESSION[ username ] . " , $exp , 0 , $Pokemon_level )") or die(mysql_error());
echo "Your money is over";
}
如同一说,在新闻项目1-5中,插入项目6,即项目6的所有内容。