Hi everybody,
Here is the code for creating a website,please have a look on the attachment(It shows how my web page looks like).I have 3 forms in each row and I have almost 2000 rows.
1)my problem is whenever I choose an option from one of the forms,It shows the result for the whole coulmns (example :If I choose passed on the first row and I click submit ,It shows passed for the all the rows in this column)
So please help me if you can give me a script that it works properly.
2)Also I have another problem.my problem is each form works seprately from the other.I mean I can not see the result of 3 forms together.it does not save the result from the previous column?
[syntax=php]
<?php
$db_host ="localhost";
$db_username ="***";
$db_pass ="****";
$db_name ="****";
@mysql_connect("$db_host","$db_username","$db_pass") or die (“Could not connect to mySQL”);
@mysql_select_db("$db_name") or die (“No database”);
$sql ="SELECT * FROM item_shop
"; //Select everything from the Database Where the columt Id = $id
$result = mysql_query($sql);
echo “
”; //Begin of the Table
?>
<td width="6%" bgcolor="#FFA07A" ><a href="?order=orgobjid&account_id=&send=send&keytype=GUID&keyword=&seq=desc">ID</a></td>
<td width="12%" bgcolor="#FFA07A" >Name</td>
<td width="1%" bgcolor="#FFA07A" >Stacked Number:\32</td>
<td width="32%" bgcolor="#FFA07A" >Description</td>
<td width="6%" bgcolor="#FFA07A" >Type </td>
<td width="20%" bgcolor="#FFA07A" >Used Type</td>
<td width="8%" bgcolor="#FFA07A" >Verification</td>
<td width="8%" bgcolor="#FFA07A" >Item Flag</td>
<td width="40%" bgcolor="#FFA07A" >Test Comment</td>
<?php
while($row = mysql_fetch_array($result))
{
?>
<td width="6%" bgcolor="#FFDEAD" ><a href="?order=orgobjid&account_id=&send=send&keytype=GUID&keyword=&seq=desc"><?php echo $row['ID']; ?></a></td>
<td width="12%" bgcolor="#FFDEAD" ><?php echo $row['Name']; ?></td>
<td width="1%" bgcolor="#FFDEAD" ><?php echo $row['Stacked_Number']; ?></td>
<td width="32%" bgcolor="#FFDEAD" ><?php echo $row['Description']; ?></td>
<td width="6%" bgcolor="#FFDEAD" ><?php echo $row['Type']; ?> </td>
<td width="20%" bgcolor="#FFDEAD" ><?php echo $row['Used_Type']; ?></td>
<td align="center" bgcolor="#FFDEAD">
Test Result?
Choose One
Passed
Blocked
Retest
Failed
Item Flag?
Choose One
Item Shop
Phirius Tocken Shop
Both
|
<?php echo $row['Test_Comment']; ?>
|
<br/>
<textarea name="txtMessage" cols="30" rows="4"></textarea>
<br />
<input type="submit" name="Submit" value="Submit" />
<input type="reset" name="Submit2" value="Reset" />
</p>
</form>
</td></tr>
</table>
<? echo $_POST['txtMessage']; ?>
<?php
echo " | ";
}
echo " "; //End of the Table
?>
[/syntax] |