大家好,我有以下 PHP 脚本:
if(isset($_POST['add_slider']))
{
echo '<div class="sliderz">';
$images = mysql_query("SELECT * FROM store");
while($row = mysql_fetch_assoc($images))
{
echo '<ul class="connectedSortable">';
echo '<li>';
echo "<img class='ui-state-default' src=".$row['image'].">";
echo '</li>';
echo '</ul>';
}
echo '</div>';
}
html看起来像这样:
<form action="admin.php" method="POST">
<input type="submit" value="Add new slider!" name='add_slider'>
</form>
我怎样才能接受同样的事情,但将其保存到 $_SESSION :-?