About DB is PHP
Posted: Wed Jul 24, 2002 5:47 pm
ok here the page script
The second script that has players the DB is it possible to call 2 DB instead of one what would the code look like if possible<? include("left.php") ?>
<!--TEXT-->
<td VALIGN="top" bgcolor="white" width="500"><span class='print'>
<table>
<?
mysql_pconnect("localhost","root","");
mysql_select_db("psn");
$result = mysql_query("SELECT * FROM clubs where id='$id'");
while($r=mysql_fetch_array($result))
{
$id=$r["id"];
$club_name=$r["name"];
$manager=$r["manager"];
$wmessage=$r["wmessage"];
$history=$r["history"];
$honors=$r["honors"];
$stadium_address=$r["stadium_address"];
$picture=$r["picture"];
$website=$r["website"];
$emblem=$r["emblem"];
$league=$r["league"];
echo "<tr bgcolor='#333333'>
<td with='600'>
<div class='header'>$club_name</div>
</td>
<tr>
<td><img src='images/$emblem'></td>
<tr>
<td><img src='images/$picture'align='left'width='200'height='210'><b>Club Name</b>:$club_name<br><b>Managers Name:</b>$manager<br><b>Website Address:</b><a href='$website'target='blank'>$website</a></td><tr><td><b>Stadium Address</b>$stadium_address</td><tr><td><b>History:</b>$history</td><tr><td><b>Honors:</b>$honors</td>";} ?>
</table>
<td Valign="top" width="200">
<table>
<?
mysql_pconnect("localhost","root","");
mysql_select_db("psn");
$result = mysql_query("SELECT * FROM players ORDER by name ASC");
while($r=mysql_fetch_array($result))
{
$id=$r["id"];
$name=$r["name"];
$position=$r["position"];
$club=$r["club"];
$country=$r["country"];
$info=$r["info"];
$picture=$r["picture"];
$height=$r["height"];
$weight=$r["weight"];
$dob=$r["dob"];
echo "<tr><td><div class=''><a href='players.php?id=$id' class='body'>$name</a></div></td>";}?>
</body>
</html>