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
I3lade
Forum Commoner
Posts: 70 Joined: Wed Jun 04, 2003 4:20 pm
Post
by I3lade » Sat Jun 07, 2003 1:51 pm
Where in here is my variuable:
Code: Select all
<?
mysql_connect("localhost","bladegames", "***");
mysql_select_db("bladegames");
echo "<table>
<tr><td>Number</td><td>Username</td><td>Email</td></tr>
";
$query = mysql_query("SELECT * FROM members ORDER BY id");
while($row=mysql_fetch_array($query))
{
echo "<tr><td>$rowїid]</td><td>$row
<a href="lookup.php?memberid=<?=$rowїlogin]->id?"> $rowїlogin] </a></td><td>
$rowїemail] </td></tr>";
}
}else{
printf("Your not logged in, plz login again");
};
?> I think its in the link not sure.. The link is:
Code: Select all
a href="lookup.php?memberid=<?=$rowїlogin]->id?"> $rowїlogin] </a
Last edited by
I3lade on Sat Jun 07, 2003 2:33 pm, edited 1 time in total.
m3rajk
DevNet Resident
Posts: 1191 Joined: Mon Jun 02, 2003 3:37 pm
Post
by m3rajk » Sat Jun 07, 2003 2:18 pm
I3lade wrote: Code: Select all
<a href="lookup.php?memberid=<?=$row[login]->id?"> $row[login] </a>something about that looks like it might be the issue... or maybe a different one.
why do you have
<?=$row[login]->id?">
it looks like you open php, but you're already in a php block. maybe i'm missing something about sql here
maybe
Code: Select all
<a href="lookup.php?memberid=$row[login]->id">it's the <?=$row[login]->id?"> that bothers me.
I3lade
Forum Commoner
Posts: 70 Joined: Wed Jun 04, 2003 4:20 pm
Post
by I3lade » Sat Jun 07, 2003 2:29 pm
My link works omfg! I dont knwo what the vairable is thogugh.....
I3lade
Forum Commoner
Posts: 70 Joined: Wed Jun 04, 2003 4:20 pm
Post
by I3lade » Sat Jun 07, 2003 2:50 pm
You see i need to put the variable in my where statement
Code: Select all
$query = mysql_query("SELECT * FROM members
where id='$I need my variable here!'"); So please help me think of what to put there...
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Sat Jun 07, 2003 3:25 pm
This topic has been locked, please go to the following thread if you wish to help:
viewtopic.php?t=9507
Mac