CodeLobster IDE http://codelobster.com/forum/ |
|
need help /php http://codelobster.com/forum/viewtopic.php?f=3&t=24742 |
Page 1 of 1 |
Author: | 12Strings [ Wed Jan 22, 2020 4:24 am ] |
Post subject: | need help /php |
hi guys, thought I'd try this. Trying to display records in database. Below is my code: Help? ------------------------------------------------------- <!DOCTYPE html><html> <head></HEAD><body><center><b> <b><center>lookup Link List</center></b><br> <?php error_reporting(E_ALL ^ E_NOTICE); // error_reporting(0); <?php include('lookupdb-connect.php'); $query = "SELECT * FROM `lookuptbl` WHERE `target` = `$target` ORDER by target Asc"; $result = $mysqli->query($query) or die($mysqli->error.__LINE__); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { echo '<table style="border:1px solid red;">', '<tr align="center" > <td>', $row['target'], '</td> <td>', $row['purpose'], '</td> <td>', $row['user'], '</td> <td>', $row['password'], '</td> <td>', $row['email'], '</td> <td>', $row['sec?'], '</td> <td>', $row['secAns'], '</td> <td>', $row['visits'], '</td> <td>', $row['lastdate'], '</td> <td>', $row['lasttime'], '</td> <td>', $row['saved?'], '</td> </tr> </table>'; ?> </body></html> ----------------------------------------------- this is displayed: lookup Link List query($query) or die($mysqli->error.__LINE__); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { echo '', ' ', $row['target'], ' ', $row['purpose'], ' ', $row['user'], ' ', $row['password'], ' ', $row['email'], ' ', $row['sec?'], ' ', $row['secAns'], ' ', $row['visits'], ' ', $row['lastdate'], ' ', $row['lasttime'], ' ', $row['saved?'], ' '; ?> |
Author: | Admin [ Fri Jan 24, 2020 9:14 am ] |
Post subject: | Re: need help /php |
Hi. 1) You have several syntaxt errors: two <?php missed } in the "while" body 2) You should move out <table> tag from "while" cycle Regards, Codelobster Team. |
Author: | 12Strings [ Wed Feb 19, 2020 6:32 pm ] |
Post subject: | Re: need help /php |
I wonder if the fact that win7 is no longer supported is cause for PHP not to work. Checking "php error logs" gets "cannot find path". Installed new xampp. stillno PHP? |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |