Editing form

please i am trying to make the variable $row[‘Pquantity’] editable, could you help look at the code.thanks


<?
$pplresult = mysql_query("SELECT * FROM repplac");
echo "<table border='1'><tr><th> SHOP NAME</th><th> PRODUCT NAME</th><th> PRODUCT SIZE</th><th> PRODUCT COLOUR</th><th> PRODUCT QUANTITY</th><th> PRICE</th><th> </th></tr>";
while($row = mysql_fetch_assoc($pplresult)){?>
<form action='youraccount.php' method='Post' class='slistbar'>
<?echo "<tr><td>" .$row['Sname'] ."</td><td>" .$row['Pname'] ."</td><td>" .$row['Psize'] ."</td><td>" .$row['Pcolour'] ."</td><td>" .<input type='text' name='Pquantity' id='Pquantity' value='$row['Pquantity']' > ."</td><td>" .$row['Price'] ."</td><td>" ?>
<a href="deleteproduct.php?del=<?php echo $row['Pidno'];?>">delete</a></td></tr><?php }
	// table closing tag
echo"</table>"
?>
</form>

And what is the problem?

its giving me a
Parse error: syntax error, unexpected ‘<’ in /home/reachea2/public_html/youraccount.php on line 119
and also when i decided to echo the quantity alone and added the submit button, it was adding an empty row to the table


<?
$pplresult = mysql_query("SELECT * FROM repplac");
echo "<table border='1'><tr><th> SHOP NAME</th><th> PRODUCT NAME</th><th> PRODUCT SIZE</th><th> PRODUCT COLOUR</th><th> PRODUCT QUANTITY</th><th> PRICE</th><th> </th></tr>";
while($row = mysql_fetch_assoc($pplresult)){?>
<form action='youraccount.php' method='Post' class='slistbar'>
<?echo "<tr><td>" .$row['Sname'] ."</td><td>" .$row['Pname'] ."</td><td>" .$row['Psize'] ."</td><td>" .$row['Pcolour'] ."</td><td>" .$row['Pquantity'] ."</td><td>" .$row['Price'] ."</td><td>" ?>
<a href="deleteproduct.php?del=<?php echo $row['Pidno'];?>">delete</a></td></tr><?php }
	// table closing tag
echo"</table>"
?>


<div class=‘buttonarea’>
<p>
<input type=‘submit’ name=‘submit’ value=‘Add’>
</p>
</div>
</form>

You got that error because you didn’t put the string you added to the echo for the text field in quotes.

And you might want to try to style that code a bit (indentation) to make it more readable. You’re mixing up the order of opened and closed tags (table-form-/table-/form instead of table-form-/form-/table).

“You got that error because you didn’t put the string you added to the echo for the text field in quotes.”
i am thinking the
value=‘$row[‘Pquantity’]’
is in quote, or which string are you talking about

<input type='text' name='Pquantity' id='Pquantity' value='$row['Pquantity']' >

This whole part. You added it to the echo, but didn’t put quotes around it. So the echo statement finds a < and doesn’t know what to do with that.

thats working now, thanks