Jump to content

[SOLVED] grabbing a users image


runnerjp

Recommended Posts

for some reason when and try and get the users image via

 

$getuser="SELECT * FROM users WHERE Username = ".$gettopic3['author']." "; 


$getuser2=mysql_query($getuser) or die("Could not get user");

while($getuser3=mysql_fetch_array($getuser2)){

  $getthreads3['image']=strip_tags($getthreads3['image']);
  echo $$getthreads3['image'];

 

i echo the query and it worked fine SELECT * FROM users WHERE Username = Admin

 

 

the full code is below

 

<table class='maintable'>

<tr class='headline'><td width=20%>Author</td><td width=80%>Post</td></tr> <?php
if ($pagenum == 1){
?>
<tr class='mainrow'><td valign='top'><?php echo $gettopic3['author'] ;

$getuser="SELECT * FROM users WHERE Username = ".$gettopic3['author']." "; 


$getuser2=mysql_query($getuser) or die("Could not get user");

while($getuser3=mysql_fetch_array($getuser2)){

  $getthreads3['image']=strip_tags($getthreads3['image']);
  echo $$getthreads3['image'];
  }

?>
</td>
<td vakign='top'>created on <?php  echo $gettopic3['showtime']?><br>
  <hr>
  <p>
  <?php

$message=$gettopic3['post'];

$message=nl2br($message); ?>

  <?php echo $message ?></p>
  <p><br>

    </p></td></tr>
<?php
}

$getreplies="Select * from forumtutorial_posts where parentid='$id' $max"; //getting replies

$getreplies2=mysql_query($getreplies) or die(mysql_error()."Could not get replies");

while($getreplies3=mysql_fetch_array($getreplies2))

{

   ?><tr class='mainrow'><td valign='top'><?php echo $getreplies3['author']?> </td><td vakign='top'>replied  at <?php echo $getreplies3['showtime']?> <br>
  <hr>
    <p>
      <?php

   $message=$getreplies3['post'];

   $message=nl2br($message);

   ?>
      <?php echo $message?></p>
    <p><br>

      </p></td></tr>
<?
}
?>
</table>

Link to comment
https://forums.phpfreaks.com/topic/108145-solved-grabbing-a-users-image/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.