> $first_name = ($_get['first_name']);
Problems here ...
(i) the code shown has no <form ... action='get' ...> html code that would populate $_GET[]. Consider reading about html forms and how they work, then download & run & work with form code that is reliably reputed to work till you get the hang of it.
(ii)
never accept unfiltered data from a $_get[], it exposes your page to elementary hacks, eg see
https://stackoverflow.com/questions/8683721/php-mysql-get-hack-prevention
> $row=mysqli_fetch_array($result);
That will return one row if it succeeds.
Quote
// while($row=mysqli_fetch_array($result)( { //////// RETURNS NO ROWS WHEN I USE A LOOP
$row['first_name'];
$row['last_name'];
// }
That code has no display instructions so it will display nothing. Perhaps you meant something like this?
while( $row=mysqli_fetch_array($result) ) {
echo "first name: ", $row['first_name'], " last name: ", $row['last_name'], "<br />";
}
And I'm unclear what the incomplete form at the bottom of the page is for.
Edited 1 time(s). Last edit at 09/06/2017 06:39PM by Peter Brawley.