FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Link on PHP





fizzo
Hi guys I just wanna ask how this thing works, or what kind of procedure was used here?.

Try clicking on the site below

http://nbaliveleague.com/teams/roster.php?selectedTeam=Atl

As you can see its a roster page, If you try pointing on the Player Name with the link on it and click it. It just gets the playerid field from the DATABASE and display the Informations on one Page and thats playerpage.php

And how can you have this kind of link with
Arrow http://nbaliveleague.com/players/playerpage.php?playerId=487

Hope you helped me to understand and get this thing thanks a lot guys! Have a nice day.
refinedruffian
I was not able to understand what you are asking but the first page

roster.php?selectedTeam=Atl

the team details are fetch from teamid and along with it dynamic links are setup using the player id something like this

playerpage.php?playerId=$playerid

here $playerid is variable having ids of different player.

Hope you get it.
fizzo
http://au3.php.net/pdostatement_fetch

So the process is Fetch? will the link above will help or is their any tutorials or sites that i can use to learn. Thanks!
mathiaus
fizzo wrote:
http://au3.php.net/pdostatement_fetch

So the process is Fetch? will the link above will help or is their any tutorials or sites that i can use to learn. Thanks!

No, not at all!

example.com/index.php?name=mathiaus
index.php now has a variable called $_GET['name'] with the value 'mathiaus'


example.com/index.php?age=17
index.php now has a variable called $_GET['age'] with the value '17'


Just use the $_GET variable to get that info from the URL

What you then do that that information depends on what you do with it and where the displayed information is stored (flat file or database).
fizzo
Code:
<?php
$con = mysql_connect("localhost","fizzo_League","+++++");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
$PLAYERID = $_GET['PLAYERID'];
$player = mysql_query("SELECT * FROM Players WHERE PLAYERID = '$PLAYERID'");
echo "<table border='1'>
<tr>
<th>Player</th>
<th>Jersey No</th>
</tr>";
while($row = mysql_fetch_array($player))
   {
  echo "<tr>";
  echo "<td>"."$row['FNAME']"."</td>";
  echo "<td>"."$row['NUMBER']"."</td>";
  echo "<td>"."$row['OVERALLRTG']"."</td>";
  echo "</tr>";
  }
echo "</table>";
mysql_close($con);
?>


I read a Tutorial about the Get Method and this is what Im tryin to make it out I have two pages I used on this one Players.html where it will be give the representation of the link where it passes to the PlayerPage.php click this one http://ayc.frih.net/Players.html .. Is this correct Im having errors on this page..

what will i do? thanks!
Manofgames
oops, I missed the error.
See fireboar's post
Fire Boar
The reason you're getting errors is because you're not looking at a database. There are two ways to solve this, but the easiest way is to add the line after mysql_connect:

Code:
$con = mysql_connect("localhost","fizzo_League","password");
mysql_select_db('fizzo_dbname');


Just replace 'fizzo_dbname' with whatever your database is called (not to be confused with the database user specified in mysql_connect).
Related topics
website in flash
[DESIGNER] - Como Crio páginas de acesso com Senha!
Php link system
[PHP] Error link
[OFFICIAL]What song are you listening to right now ?
link request
include
Link PHP/Mysql with Outlook Express
Receba Revista Veja e Caras de Graça
Add the link for php info in FAQ
Got a new domain
Mysql and PHP separately to work on windows 7
Follow me on Twitter. Is my HTML Correct
php link
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.