Help me find my variable!

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

Locked
I3lade
Forum Commoner
Posts: 70
Joined: Wed Jun 04, 2003 4:20 pm

Help me find my variable!

Post by I3lade »

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))

&#123;
echo "<tr><td>$row&#1111;id]</td><td>$row 
<a href="lookup.php?memberid=<?=$row&#1111;login]->id?"> $row&#1111;login] </a></td><td>
$row&#1111;email] </td></tr>";
&#125;
&#125;else&#123; 
printf("Your not logged in, plz login again");  
&#125;;
?>
I think its in the link not sure.. The link is:

Code: Select all

a href="lookup.php?memberid=<?=$row&#1111;login]->id?"> $row&#1111;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

Re: Got wher cluase down, now need help with..

Post by m3rajk »

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 »

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 »

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

Post by twigletmac »

This topic has been locked, please go to the following thread if you wish to help:
viewtopic.php?t=9507

Mac
Locked