我有一个幻灯片放映,用户可以单击带有箭头的按钮,指向下一个和上一个。当用户单击箭头时,我要在其中保存页面名称,因此它将其重定向到正确的页面。我还想存储一个数字,以便当用户单击上一个或下一个时,该整数将保存在正确的表userTakingModule中的下checkPoint。
做到这一点的最佳方法是什么,即在button标签内使用form标签?我粘贴了到目前为止,当用户单击两个箭头之一时,我试图实现的两种方法:
a。)通过使action一个箭头中的page1.html 和另一箭头中的page3.html,使用户返回上一页b。)单击保存,将值保存到userTakingModule表中。
html尝试1.)
<div class="arrow-container">
<form style="display: inline" action="dashboard.php" method="post">
<button value="1"><i class="fas fa-arrow-circle-left"></i></button>
</form>
<form style="display: inline" action="slide2.php" method="post">
<button value="3"><i class="fas fa-arrow-circle-right"></i></button>
</form>
</div>
Run Code Online (Sandbox Code Playgroud)
html尝试2.)
<div>
<form action ="dashboard.php" method = "POST"> <!-- However I may need this page link to change depending on whether they click forward or back -->
<label>Competition Categories</label>
<select name="checkPoint">
<option value="">Select</option>
<option value="1">Previous</option>
<option value="3">Next</option>
</select>
</fieldset> …Run Code Online (Sandbox Code Playgroud) 无论如何我可以在 PHP echo 语句中获得内嵌样式。我想设置图像的高度和宽度,因为当我尝试在height外部应用和 `width 时,它没有区别,因为图像在样式设置之前加载。
我已经尝试过这个,但似乎没有任何区别......
<p><b>Profile Picture: </b>
<?php
$picture = $row['imagePath'];
if (empty($picture)){
echo "<img src='profiles/no-image.png' 'width=500' 'height=600' >";
} else {
echo "<img src='".$row['imagePath']."' 'width=500' 'height=600' >";
};
?></p>
Run Code Online (Sandbox Code Playgroud)