GP1 wrote:
I think it has to be an IOS.
Ok, anyway, can you fix the login glitch on the website, and fix up the font and style of each page a bit more? It is getting messy. Leave the navigation where it is, or you can out it horizontally if you can, thanks!
Offline
Try this, but look near the bottom where the comment is and change according to the database rows.
<link rel="stylesheet" type="text/css" href="global.css" />
<?php
$dbHost = '*'; // localhost will be used in most cases
// set these to your mysql database username and password.
$dbUser = '*';
$dbPass = '*';
$dbDatabase = '*'; // the database you put the table into.
$con = mysql_connect($dbHost, $dbUser, $dbPass) or trigger_error("Failed to connect to MySQL Server. Error: " . mysql_error());
mysql_select_db($dbDatabase) or trigger_error("Failed to connect to database. Error: " . mysql_error());
// Set up our error check and result check array
$error = array();
$results = array();
// First check if a form was submitted.
// Since this is a search we will use $_GET
$query="SELECT * FROM messages";
$result=mysql_query($query);
while($row=mysql_fetch_array($result){
//***************put code to execute for every row here, like:
echo $row['username'];
echo $row['messageContent'];
}
?>Offline
GP1 wrote:
Try this, but look near the bottom where the comment is and change according to the database rows.
Code:
<link rel="stylesheet" type="text/css" href="global.css" /> <?php $dbHost = '*'; // localhost will be used in most cases // set these to your mysql database username and password. $dbUser = '*'; $dbPass = '*'; $dbDatabase = '*'; // the database you put the table into. $con = mysql_connect($dbHost, $dbUser, $dbPass) or trigger_error("Failed to connect to MySQL Server. Error: " . mysql_error()); mysql_select_db($dbDatabase) or trigger_error("Failed to connect to database. Error: " . mysql_error()); // Set up our error check and result check array $error = array(); $results = array(); // First check if a form was submitted. // Since this is a search we will use $_GET $query="SELECT * FROM messages"; $result=mysql_query($query); while($row=mysql_fetch_array($result){ //***************put code to execute for every row here, like: echo $row['username']; echo $row['messageContent']; } ?>
Thanks, but it says "unexpected { at line 23"
Offline
WindowsExplorer wrote:
GP1 wrote:
Try this, but look near the bottom where the comment is and change according to the database rows.
Code:
<link rel="stylesheet" type="text/css" href="global.css" /> <?php $dbHost = '*'; // localhost will be used in most cases // set these to your mysql database username and password. $dbUser = '*'; $dbPass = '*'; $dbDatabase = '*'; // the database you put the table into. $con = mysql_connect($dbHost, $dbUser, $dbPass) or trigger_error("Failed to connect to MySQL Server. Error: " . mysql_error()); mysql_select_db($dbDatabase) or trigger_error("Failed to connect to database. Error: " . mysql_error()); // Set up our error check and result check array $error = array(); $results = array(); // First check if a form was submitted. // Since this is a search we will use $_GET $query="SELECT * FROM messages"; $result=mysql_query($query); while($row=mysql_fetch_array($result){ //***************put code to execute for every row here, like: echo $row['username']; echo $row['messageContent']; } ?>Thanks, but it says "unexpected { at line 23"
Whoops, I forgot an extra ) this is right
Code:
<link rel="stylesheet" type="text/css" href="global.css" />
<?php
$dbHost = '*'; // localhost will be used in most cases
// set these to your mysql database username and password.
$dbUser = '*';
$dbPass = '*';
$dbDatabase = '*'; // the database you put the table into.
$con = mysql_connect($dbHost, $dbUser, $dbPass) or trigger_error("Failed to connect to MySQL Server. Error: " . mysql_error());
mysql_select_db($dbDatabase) or trigger_error("Failed to connect to database. Error: " . mysql_error());
// Set up our error check and result check array
$error = array();
$results = array();
// First check if a form was submitted.
// Since this is a search we will use $_GET
$query="SELECT * FROM messages";
$result=mysql_query($query);
while($row=mysql_fetch_array($result)){
//***************put code to execute for every row here, like:
echo $row['username'];
echo $row['messageContent'];
}
?>Offline
GP1 wrote:
WindowsExplorer wrote:
GP1 wrote:
Try this, but look near the bottom where the comment is and change according to the database rows.
Code:
<link rel="stylesheet" type="text/css" href="global.css" /> <?php $dbHost = '*'; // localhost will be used in most cases // set these to your mysql database username and password. $dbUser = '*'; $dbPass = '*'; $dbDatabase = '*'; // the database you put the table into. $con = mysql_connect($dbHost, $dbUser, $dbPass) or trigger_error("Failed to connect to MySQL Server. Error: " . mysql_error()); mysql_select_db($dbDatabase) or trigger_error("Failed to connect to database. Error: " . mysql_error()); // Set up our error check and result check array $error = array(); $results = array(); // First check if a form was submitted. // Since this is a search we will use $_GET $query="SELECT * FROM messages"; $result=mysql_query($query); while($row=mysql_fetch_array($result){ //***************put code to execute for every row here, like: echo $row['username']; echo $row['messageContent']; } ?>Thanks, but it says "unexpected { at line 23"
Whoops, I forgot an extra ) this is right
Code:
Code: <link rel="stylesheet" type="text/css" href="global.css" /> <?php $dbHost = '*'; // localhost will be used in most cases // set these to your mysql database username and password. $dbUser = '*'; $dbPass = '*'; $dbDatabase = '*'; // the database you put the table into. $con = mysql_connect($dbHost, $dbUser, $dbPass) or trigger_error("Failed to connect to MySQL Server. Error: " . mysql_error()); mysql_select_db($dbDatabase) or trigger_error("Failed to connect to database. Error: " . mysql_error()); // Set up our error check and result check array $error = array(); $results = array(); // First check if a form was submitted. // Since this is a search we will use $_GET $query="SELECT * FROM messages"; $result=mysql_query($query); while($row=mysql_fetch_array($result)){ //***************put code to execute for every row here, like: echo $row['username']; echo $row['messageContent']; } ?>
Thank you! Now it works perfectly
Offline
I know what you did wrong.
Edits marked in green.
<link rel="stylesheet" type="text/css" href="global.css" />
<?php
$dbHost = '*'; // localhost will be used in most cases
// set these to your mysql database username and password.
$dbUser = '*';
$dbPass = '*';
$dbDatabase = '*'; // the database you put the table into.
$con = mysql_connect($dbHost, $dbUser, $dbPass) or trigger_error("Failed to connect to MySQL Server. Error: " . mysql_error());
mysql_select_db($dbDatabase, $con) or trigger_error("Failed to connect to database. Error: " . mysql_error());
// Set up our error check and result check array
$error = array();
$results = array();
// First check if a form was submitted.
// Since this is a search we will use $_GET
$query="SELECT * FROM messages";
$result=mysql_query($query, $con);
echo "$result";
?>
Offline