Im wondering how I can do this, I want to make a page which will call the DB and connect to it load the data.
for example
Page would show
User: SQL User
Active: SQL Yes/No
Email: SQL Email
UserID: SQL UserID
How would I go about making it so the SQL User etc. shows the value which is in the table?
This is what I learned so far..
so example would be
Include.php
Code:
<?
$username="Example";
$password="PasswordTest";
$database="new_db";
$table="tablename";
?>
then the code to call
page.php
Code:
<?
include("include.php");
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM users";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
?>
if the Table USERS had
User: SQL User
Active: SQL Yes/No
Email: SQL Email
UserID: SQL UserID
It should show up as
User: Test
Active: Yes
Email:
Something@something.com
UserID: 1
Correct?