Go Back   Web User Forums > All Other Technical Help Topics > Web design & build

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 17-08-18, 19:05
TheClash TheClash is offline
Enthusiastic contributor
 
Join Date: Sep 2015
Posts: 260
Question database populated but not ouputting data

when i run my php program it is displaying the name of the field variables o n the screen not the content of DB?


echo"output the database **** as monkey 2";

/*Please Do not change anything below this line */

$link = mysqli_connect("$mysqli_host", "$mysqli_user", "$mysqli_password", "$my_database")
or die("Could not connect : " . mysqli_error($link));
echo "Connected successfully";
mysqli_select_db($link, "$my_database") or die("Could not select database");



echo '<table>
<tr>
<td>fname</td>
<td>lname</td>
<td>name</td>
<td>email</td>

</tr>
<tr>

<td>'.$result["fname"].'</td>
<td>'.$result["lname"].'</td>
<td>'.$result["name"].'</td>
<td>'.$result["email"].'</td>


</tr>
</table>';


?>


see attachments
Attached Images
File Type: jpg CONTENTS.jpg (62.5 KB, 0 views)
File Type: jpg NAMETABLE.jpg (36.1 KB, 11 views)
Reply With Quote
  #2  
Old 18-08-18, 07:44
Sneakybeaky's Avatar
Sneakybeaky Sneakybeaky is offline
Passionate member
 
Join Date: Aug 2012
Location: Gosport Hants
Posts: 1,311
Default Re: database populated but not ouputting data

https://www.w3schools.com/php/php_mysql_select.asp

https://stackoverflow.com/questions/...e-on-a-webpage
__________________
Contrariwise,continued Tweedledee, if it was so, it might be; and if it were so, it would be: but as it isn't, it ain't. That's logic.
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Search the forum

Search

© Dennis Publishing Limited Licensed by Felden





All times are GMT. The time now is 05:56.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright Dennis Publishing 2010, All rights reserved