First of all sorry for my bad english.
I have a php script that display a list of products from sql:
$cerereSQL = 'SELECT * FROM `produse`';
$rezultat = mysql_query($cerereSQL);
while($rand = mysql_fetch_array($rezultat)){
echo '
<form action="editare.php" method="post">
<table width="100%" cellpadding="0" cellspace="0">
<tr style="text-align:center;" height="25">
<td style="border:1px solid black;" width="7%" height="10"><i> '.$rand['indice'].' </i></td>
<td style="border:1px solid black;" width="40%"><i> '.$rand['denumire_produs'].' </i></td>
<td style="border:1px solid black;" width="20%"><i> '.$rand['producator'].' </i></td>
<td style="border:1px solid black;" width="10%"><i> '.$rand['pret'].' </i></td>
<td style="border:1px solid black;" width="6%"><i> '.$rand['valuta'].' </i></td>
<td style="border:1px solid black;" ><i> '.$rand['cod'].' </i></td>
<td width="5%"><input type="submit" name="submit" value="Edit"></td>
</tr>
</table>
</form>';
I want the button (value="Edit") from the end of each row to select exactly the product from the same row, to be edited.
I tried next code but did't work (i have a list with 5000 lines):
switch($_GET['actiune'])
{
case '':
$cerereSQL = 'SELECT * FROM `produse` WHERE denumire_produs="'.$rand['denumire_produs'].'"';
I know i have to use: $cerereSQL = 'SELECT * FROM
produseWHERE denumire_produs="......";
but i don't know how to do this, how to make the edit button, open the exactly product from the same row.
Can someone please help me with a suggestion?