Page 1 of 1

help me please

Posted: Wed Jul 24, 2002 1:05 am
by psn
<?
mysql_pconnect("localhost","root","");
mysql_select_db("psn");
$result = mysql_query("SELECT * FROM clubs WHERE league='nsl' ORDER by name ASC");
while($r=mysql_fetch_array($result))
{
$clubname=$r["name"];
$emblem=$r["emblem"];
$id=$r["id"];
echo "<tr><td><div class=''><img src='images/$emblem'width='30'height='15'><a href='club.php?id=$id'class='body'>$clubname</a></div></td>";}?>

This code is where there are clubs.

The next script is clubs profile
?
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"];
$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><td><img src='images/$emblem'width='120'height='150'></td><tr><td></td>";}?>
Its not exaclty finished. But I want to be able to click on a link in the first script and have the profile pop up in the second script
How do I do that?
The table in both are the same.

Re: help me please

Posted: Wed Jul 24, 2002 1:17 am
by prasadharischandra
<a href="2ndpage?id="test" target="_blank">nextpage</a>
or can u write me what u want to do exactly

Re: help me please

Posted: Wed Jul 24, 2002 1:20 am
by prasadharischandra
><a href='club.php?id=$id'class='body' target="_blank">$clubname</a>
go to next page and echo $id;

Posted: Wed Jul 24, 2002 1:42 am
by psn
Well the second script i want to show the clubs profile.
which is
honors
history
stadium picture
manager etc
but the link from the first script doesn't work properly. It gives me an error saying like no page exists.
this is one in browser view
<emblem><a href="clubs.php?id=18"class="body">Adeliade Force</a>
Then from there i want the link to go to the clubs page
and give me the profile of that club
is this possible or will i have to make thousands of files

Posted: Wed Jul 24, 2002 2:03 am
by twigletmac

Posted: Wed Jul 24, 2002 2:22 am
by psn
That didnt help me at all.
Im using php 3xxxx
and how would i be able to do this please help it will help make the site be finished quicker

Posted: Wed Jul 24, 2002 2:27 am
by twigletmac
Hey I didn't know what version of PHP you were using until you just said - it will make it easier for everyone to help now they know though. PHP v3 is definitely not standard any more and most of the answers you would have gotten would have probably related to PHP 4.1 up.

Mac

Posted: Wed Jul 24, 2002 3:57 am
by gnu2php
psn wrote:. . . but the link from the first script doesn't work properly. It gives me an error saying like no page exists.
That's odd. Are you sure the club.php file is in the same folder as the first script file?

Posted: Wed Jul 24, 2002 3:23 pm
by psn
its working