Having a problem. I want it so if you goto this certain page it displays a row from the table and all the fields.
I have done a config.php which is this (but filled in):
<?php $host = "localhost"; $user = "myusername"; $pwd = "mypassword"; $db = "mypassword"; ?>
Then a connection.php file:
<?php require_once("config.php"); $connection = mysql_connect($host, $user, $pwd) or die("&error1=".mysql_error()); mysql_select_db($db, $connection); ?>
Now I want to display a query in a table from the database but no idea how.
I guess it is something like this but alot more complex. The table is called "profiles" and I want it to display all the fields in a table, under the user id 1.
<?php> require_once("connection.php"); $query = SELECT all fields FROM profiles WHERE id=1 ?>
Any help, would be much appreciated.