Я новичок в PHP. У меня есть одна таблица No, Date, FileName, FileSize, Attachment Code, FileLink, Share
. Я просто нажимаю кнопку «Поделиться», под ней будет поле. Дайте ему почтовый идентификатор, и я просто нажму кнопку «Поделиться». Итак, моя проблема заключается в том, что я нажимаю на любую кнопку общего доступа, передавая тот же идентификатор. Мой код здесь:
<form>
<?php
include "connect.php" ;
$attchquery= mysql_query("select * from eduploads order by id desc limit 5") ;
echo "<table style='width:100%' class='table'>" ;
echo "<tr>" ;
echo "<th>No</th><th>Date</th><th>File Name</th><th>FileSize</th><th>Attachemnt Code</th><th>File Link</th><th>Share</th>" ;
echo "</tr>" ;
$count = 0 ;
while ($row = mysql_fetch_array($attchquery)) {
$count++ ;
echo "<tr>" ;
echo "<td>",$count,"</td><td>",$row['filedate'],"</td><td>",
$row['filename'].".".$row['fileext'],"</td><td>",
$row['filesize'],"</td><td>",$row['fileid'],"</td><td>",
"<a href='".$valueres['settingsvalue'],$row['filelink']."'>Download</a></td><td>",
"<input type='hidden' value='".$row['fileaddname']."' name='emailvaluepass'><input type='submit' value='Share' name='singlemailshare' class='btn btn-primary'></td>" ;
echo "</tr>" ;
}
echo "</table>" ;
?>
<input type='text' name='singleemail' required>
</form>
// get value
if(isset($_POST['singlemailshare']))
{
echo $single_email_sharing = $_POST['singleemail'] ;
echo $single_email_id = $_POST['emailvaluepass'] ; // Only get last value
}
Как исправить мою проблему? Можете ли вы привести хорошие примеры?