I'm trying to have the value of a PHP variable there's my code: ...
while($row = mysqli_fetch_array($response)){
$var = $row['num'];
echo $var;
echo '<tr><td align="left">' .
$row['id'] . '</td><td align="left">' .
$row['num'] . '</td><td align="left">' .
$row['used'] . '</td><td align="left">' .
$row['temps'] . '</td><td align="left">' .
$row['prix'] . '</td><td align="left">' .
$row['date'] . '</td><td align="left"> .
<p>
<form action="delete.php" method="post">
<input type="text" name="name" value=$var />
</p>
<p>
<input type="submit" name="submit" value="Delete" />
</p>
</form>';
echo '</tr>';
}
i'm trying to put the value of $var but when i do this code there's an error
( ! ) Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting ',' or ';' in C:\wamp64\www\Site test\php\mysql_getInfo.php on line 39
For information my code is getting the database and putting on a website, I'm trying to add button to delete from the database.