hi
I have following html form where i can add mutiple row as well for new enteries
<form>
<input type = text name = name[] id = name >
<input type = text name = rollno[] id = rollno >
<input type = submit value = submit > </form>
After submit i want to display this form value via post method as
<?php
if(isset($_POST['submit']))
{
$name = $_POST['name'];
$rollno = $_POST['rollno'];
}
Now I want to replace $_POST[‘rollno’]; with fathername field value available in mysql table ‘student’ as follow
$sql = "SELECT fname FROM student WHERE 'rollno' = '$rollno'";
$result = $con->query($sql);
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$fname = $row['fname'];
}}
currently its given as : Notice: Array to string conversion in /home/thehospi/public_html/le/bill/invoice.php on line 61
my html form using array as multiple entries can be possible with one submit, Guidance needed regarding this