Reputation: 3
I made the changes and now they are in the same table but not under the correct column and the address is not completely rendering. It appears to only be taking the first word which is numbers and leaving off the rest.
enter image description hereIt
$header = false;
$result = mysqli_query($db, "CALL Webc") or die("Query fail: " . mysqli_error());
while ($row = mysqli_fetch_assoc($result)){
if ($header == false ) {
echo "<table border=1>
<th>Customer ID</th>
<th>Active</th>
<th>TDate</th>
<th>Student Type</th>
<th>First Name</th>
<th>Last Name</th>
<th>Address</th>
<th>City</th>
<th>State</th>
<th>Zip</th>
<th>UserName</th>
<th>Email</th>
<th>Password</th>";
$header = true;
}
echo "<form action=update_students.php method=post>";
echo "<tr><td>" . "<input type=text name=CustomerID value=" .$row["CustomerID"]. " </td></tr>";
echo "<tr><td>" . "<input type=text name=active value=" .$row["active"]. " </td></tr>";
echo "<tr><td>" . "<input type=text name=TDate value=" .$row["TDate"]. " </td></tr>";
echo "<tr><td>" . "<input type=text name=StudentType value=" .$row["StudentType"]. " </td></tr>";
echo "<tr><td>" . "<input type=text name=FirstName value=" .$row["FirstName"]. " </td></tr>";
echo "<tr><td>" . "<input type=text name=LastName value=" .$row["LastName"]. " </td></tr>";
echo "<tr><td>" . "<input type=text name=Address value=" .$row["Address"]. " </td></tr>";
echo "<tr><td>" . "<input type=text name=City value=" .$row["City"]. " </td></tr>";
echo "<tr><td>" . "<input type=text name=State value=" .$row["State"]. " </td></tr>";
echo "<tr><td>" . "<input type=text name=Zip value=" .$row["Zip"]. " </td></tr>";
echo "<tr><td>" . "<input type=text name=Email value=" .$row["Email"]. " </td></tr>";
echo "<td>". "<input type=submit name=update value=update>". "</td>";
echo "<td>". "<input type=submit name=delete value=delete>". "</td>";
echo '<br />';
echo "</form>";
}
Upvotes: 0
Views: 59
Reputation: 631
Here in output you missed in here is an expample from you code:
echo "<tr>" . "<input type=text name=CustomerID value=" .$row["CustomerID"]. " </tr>";
should be written a
echo "<tr><td>" . "<input type=text name=CustomerID value=" .$row["CustomerID"]. " </td></tr>";
Upvotes: 1