JRosario78
MIS
Hi,
I am unable to pull data from the MySQL data bause using the following code:
<html>
<head>
<title>Contacts</title>
<style>
A:link {text-decoration:none; color:#3152A5;}
A:visited {text-decoration:none; color:#3152A5;}
A:hover {text-decoration:none; color:#6699FF}
</style>
<?
$dbconnect = mysql_connect ("localhost", "alasfdu_public", "password")
or die ('Cannot connect to the database because: ' . mysql_error());
mysql_select_db("alasfdu_alasmem");
?>
</head>
<body bgcolor="#FFFFFF" text="#3152A5">
<table border="0" align="center" cellpadding="1" cellspacing="0" width="75%">
<tr>
<th align="center" colspan="5" bgcolor="#E0E0E0">Contactos</th>
</tr>
<tr bgcolor="#F8F8FF">
<th align=center>Position</th>
<th align=center>Name</th>
<th align=center>Country</th>
</tr>
<?
$num=1;
include ("config.php");
$result = mysql_query ("select * from board_mem", $dbconnect);
while ($row = mysql_fetch_array($result))
{
extract($row);
($num == 1)?$bgcolor="#F5F5F5":$bgcolor="#F8F8FF";
?>
<tr bgcolor="<?=$bgcolor?>">
<td align=center><b><a href="#"><?=$row[1]?></a></b></td>
<td align=center><b><a href="#"><?=$row[2]?></a></b></td>
<td align=center><b><a href="#"><?=$row[3]?></a></b></td>
</tr>
<?
if($num == 1)
{
$num++;
}
else
{
$num--;
}
}
?>
</table>
</body>
</html>
I've spent hours and still can't get this to work. Could some one please HELP!
I am unable to pull data from the MySQL data bause using the following code:
<html>
<head>
<title>Contacts</title>
<style>
A:link {text-decoration:none; color:#3152A5;}
A:visited {text-decoration:none; color:#3152A5;}
A:hover {text-decoration:none; color:#6699FF}
</style>
<?
$dbconnect = mysql_connect ("localhost", "alasfdu_public", "password")
or die ('Cannot connect to the database because: ' . mysql_error());
mysql_select_db("alasfdu_alasmem");
?>
</head>
<body bgcolor="#FFFFFF" text="#3152A5">
<table border="0" align="center" cellpadding="1" cellspacing="0" width="75%">
<tr>
<th align="center" colspan="5" bgcolor="#E0E0E0">Contactos</th>
</tr>
<tr bgcolor="#F8F8FF">
<th align=center>Position</th>
<th align=center>Name</th>
<th align=center>Country</th>
</tr>
<?
$num=1;
include ("config.php");
$result = mysql_query ("select * from board_mem", $dbconnect);
while ($row = mysql_fetch_array($result))
{
extract($row);
($num == 1)?$bgcolor="#F5F5F5":$bgcolor="#F8F8FF";
?>
<tr bgcolor="<?=$bgcolor?>">
<td align=center><b><a href="#"><?=$row[1]?></a></b></td>
<td align=center><b><a href="#"><?=$row[2]?></a></b></td>
<td align=center><b><a href="#"><?=$row[3]?></a></b></td>
</tr>
<?
if($num == 1)
{
$num++;
}
else
{
$num--;
}
}
?>
</table>
</body>
</html>
I've spent hours and still can't get this to work. Could some one please HELP!