Jump to content
php.lv forumi

mainigo nosutisana


neo

Recommended Posts

Tabulaa ir triis ieraksti.

Uz ekraana tiek izvadiiti attieciigi triis checkbox ar savu id veertiibu.

Probleema: forma nosuuta tikai vienu mainiigo, kaut arii ir ieklikskinaats visos checkbox.

 

<?
//fails tests.php
include("db.php");

$result=mysql_query ("SELECT * FROM gallery ORDER BY id desc ");

echo"<form name=form method=post action=tests.php>";

while($row = mysql_fetch_array($result)){

echo"<input name=mainigais type=checkbox value=$row[id]>";
                                                            }

echo" <input type=submit name=submit value=Submit> </form>  ";

if(isset($submit)){

echo $mainigais;
}

?>

Link to comment
Share on other sites

korektaak butu:

echo"<form name=\"form\" method=\"post\" action=\"tests.php\">";

un pie tam, ja jau visiem input tagiem name ir mainigais, tad logjiski, ka arii tu dabuusi tikai vienu $mainigais!

Tak katram tagadm citu nami liec!

Link to comment
Share on other sites

×
×
  • Create New...