Page 1 of 1

Help me find my variable!

Posted: Sat Jun 07, 2003 1:51 pm
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

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

Posted: Sat Jun 07, 2003 2:18 pm
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.

Posted: Sat Jun 07, 2003 2:29 pm
by I3lade
My link works omfg! I dont knwo what the vairable is thogugh.....

Posted: Sat Jun 07, 2003 2:50 pm
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...

Posted: Sat Jun 07, 2003 3:25 pm
by twigletmac
This topic has been locked, please go to the following thread if you wish to help:
viewtopic.php?t=9507

Mac