Hi,
I'm using PHP5 and MySQLi. I've got a script that outputs first and last names from my database, and the idea is that each one will link to something like "/profile.php?employeeID=$employeeID" where the employee ID belongs to that specific record in the db.
This is my first PHP site, so I admittedly still suck. I've researched all over the place and am having trouble finding good example code with MySQLi - if anybody knows of any beginner-friendly resources for that, please share!
Anyways, this is what I've got - if you know how to make it work, help a sister out! :o
if ($result = mysqli_query($link, 'SELECT employeeID, firstName, lastName FROM employees ORDER BY lastName')) {
while( $row = mysqli_fetch_assoc($result) ){
printf("<a href=/profile.php?employeeID=$employeeID>
%s, %s</a><br><br>\n", $row['lastName'], $row['firstName']);
}