CodeLobster IDE

Free cross-platform PHP IDE (HTML, PHP, CSS, JavaScript, Python code editor) with support Drupal, Joomla, Twig, JQuery, BackboneJS, LaravelJS, Node.js, CodeIgniter, CakePHP, Laravel, Magento, MeteorJS, Phalcon, Symfony, VueJS, WordPress, Yii
It is currently Thu Mar 28, 2024 9:58 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: need help /php
PostPosted: Wed Jan 22, 2020 4:24 am 
Offline

Joined: Tue Jun 16, 2015 1:03 am
Posts: 21
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?'], '
'; ?>


Top
 Profile  
 
 Post subject: Re: need help /php
PostPosted: Fri Jan 24, 2020 9:14 am 
Offline
Site Admin

Joined: Wed Sep 12, 2007 2:18 pm
Posts: 3931
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.


Top
 Profile  
 
 Post subject: Re: need help /php
PostPosted: Wed Feb 19, 2020 6:32 pm 
Offline

Joined: Tue Jun 16, 2015 1:03 am
Posts: 21
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 45 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2016 phpBB Group