help me please

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
psn
Forum Newbie
Posts: 13
Joined: Wed Jul 17, 2002 10:22 pm

help me please

Post 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.
prasadharischandra
Forum Commoner
Posts: 57
Joined: Thu May 09, 2002 2:19 am
Location: sri lanka
Contact:

Re: help me please

Post by prasadharischandra »

<a href="2ndpage?id="test" target="_blank">nextpage</a>
or can u write me what u want to do exactly
prasadharischandra
Forum Commoner
Posts: 57
Joined: Thu May 09, 2002 2:19 am
Location: sri lanka
Contact:

Re: help me please

Post by prasadharischandra »

><a href='club.php?id=$id'class='body' target="_blank">$clubname</a>
go to next page and echo $id;
psn
Forum Newbie
Posts: 13
Joined: Wed Jul 17, 2002 10:22 pm

Post 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
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

psn
Forum Newbie
Posts: 13
Joined: Wed Jul 17, 2002 10:22 pm

Post 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
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
gnu2php
Forum Contributor
Posts: 122
Joined: Thu Jul 11, 2002 2:53 am

Post 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?
psn
Forum Newbie
Posts: 13
Joined: Wed Jul 17, 2002 10:22 pm

Post by psn »

its working
Post Reply