我正试图从允许多种检查箱的形式上插入我的桌子。
这是:
<input type= submit name= invite-group value= Invite To Group >
<br />
<?php
$query2aac = mysql_query("SELECT * FROM follow WHERE yoozer1= $userdb1a AND followaccept= Yes ORDER BY yoozer2 DESC");
while($row2aac = mysql_fetch_array($query2aac))
{
$rowid = $row2aac[ followid ];
$yoozer2aac = $row2aac[ yoozer2 ];
$yoozer2aacurl = strtolower($yoozer2aac);
$palurl = <a href="http://www.bunchofus.com/fanpage/ . $yoozer2aacurl . "> . $yoozer2aac . </a> ;
echo <input type= "hidden" name = "id[]" value=" . $rowid . "></input> ;
echo <input type= "checkbox" name = "friends[]" value=" . $yoozer2aac . "> . $palurl . </input><br /> ;
}
?>
This is the php:
if ($submit)
{
$submit = $_POST[ invite-group ];
$date1 = date("Y-m-d");
$lowername = strtolower($username);
$combined = $_POST[ friends ];
foreach ($combined as $username)
{
$insert1 = mysql_query("INSERT INTO grprequest VALUES ( , $grpid3 , $username , $myuser , $grprights3 , $grpactive3 )");
}
}
?>
它正在数据库中插入一条线,但不是多个线。 如果在标书之后我重复使用名称,那么多个用户名称正在显示。
如果任何人都能够帮助,我将不胜感激。