Please somebody can check this code? what is wrong with it? I did not post the username neither the password
<html>
<head>
<title>OLG Home</title>
</head>
<body style="font-size:15pt;color:#3574EC7;font-family:arial">
<table style="color:3574e7" width="100%">
<tr>
<td>VLG
</td>
<td>
<div style="text-align:right">Log in</div></td></tr></table>
<hr>
<p>
<table style="background-color:c2dfff" align="right" width="30%">
<th>This week List</th>
<tr>
<td>Primiry</td></tr>
<tr><td>Second</td></tr></table>
<?php
// Connecting, selecting database
$link = mysql_connect('localhost', 'xxx', 'xxx')
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('anilson1_olgDB') or die('Could not select database');
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// Performing SQL query
$query = 'SELECT * FROM PersonalTable';
$result = mysql_query($FullName) or die('Query failed: ' . mysql_error());
//$result = mysql_query($Email) or die('Query failed: ' . mysql_error());
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
?>
</body>
<html>
what I receive in webpage is:
VLG
This week ListPrimirySecondConnected successfullyQuery failed: Query was empty
What is wrong here with mysql_query() ???
<html>
<head>
<title>OLG Home</title>
</head>
<body style="font-size:15pt;color:#3574EC7;font-family:arial">
<table style="color:3574e7" width="100%">
<tr>
<td>VLG
</td>
<td>
<div style="text-align:right">Log in</div></td></tr></table>
<hr>
<p>
<table style="background-color:c2dfff" align="right" width="30%">
<th>This week List</th>
<tr>
<td>Primiry</td></tr>
<tr><td>Second</td></tr></table>
<?php
// Connecting, selecting database
$link = mysql_connect('localhost', 'xxx', 'xxx')
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('anilson1_olgDB') or die('Could not select database');
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// Performing SQL query
$query = 'SELECT * FROM PersonalTable';
$result = mysql_query($FullName) or die('Query failed: ' . mysql_error());
//$result = mysql_query($Email) or die('Query failed: ' . mysql_error());
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
?>
</body>
<html>
what I receive in webpage is:
VLG
Log in
This week ListPrimirySecondConnected successfullyQuery failed: Query was empty
What is wrong here with mysql_query() ???