Next time make sure you search forum very before making a request.
I think I av code something like this and share it here last 3months ago.

http://netnaija.com/forum/web-desings/phpsnippets/4272-pbnl-crawl-out-the-first-occurence-image-url-a-post-use-it-to-at-featured-links-like-netnaija


And if you don't understand it share me your files here I will try and help


Ok, here's the code assistance I can come up with
BUT its now left to you to tweak it to suit the rest of your codes.

//for example let's say have a table called 'users'.
// and you have a column called 'level'
// then you store 1 for admin and 0 for normal members.
//After user has logged in succesfully..in your homepage script.
//Add this code
<?php
// fetch information from database
$query ="Select `level` From `users` where `username`='$loggedinuser';
$result = mysql_query($query);
//now remember 1 is admin and 0 is members.
If($result == 0){
Echo "<p><img src="avatar.jpg">normal USER</p>";
}
Elseif($result == 1){
Echo <p><img src="crown.jpg" alt="crown image"> ADMIN</p>
}

Pls note...make sure to change
1.Database table name
2.Column name to the one in your table
3. Img source.

This is my short simple version according to what I understand for what you need

Godzilla01

I love it. Dats wat i wish to help him wit dats y i ask 4 wat differenciate User 4rm Admin in his users table. Kip it up


Ok, here's the code assistance I can come up with
BUT its now left to you to tweak it to suit the rest of your codes.

//for example let's say have a table called 'users'.
// and you have a column called 'level'
// then you store 1 for admin and 0 for normal members.
//After user has logged in succesfully..in your homepage script.
//Add this code
<?php
// fetch information from database
$query ="Select `level` From `users` where `username`='$loggedinuser';
$result = mysql_query($query);
//now remember 1 is admin and 0 is members.
If($result == 0){
Echo "<p><img src="avatar.jpg">normal USER</p>";
}
Elseif($result == 1){
Echo <p><img src="crown.jpg" alt="crown image"> ADMIN</p>
}

Pls note...make sure to change
1.Database table name
2.Column name to the one in your table
3. Img source.

This is my short simple version according to what I understand for what you need

Godzilla01

I love it. Dats wat i wish to help him wit dats y i ask 4 wat differenciate User 4rm Admin in his users table. Kip it up

Ok!
Copy the Below Code and Save as photos.php U must Edit the table name. Bcoz I neva use d tin b4.
edit the css to suit u

Code
<?php error_reporting(0);
/* Netnaija Trending Gallery */
{
$gerard=mysql_query("SELECT * FROM `galleries` ORDER BY `id` DESC LIMIT 5");
$num=mysql_num_rows($gerard);
if($num==0)
{
echo"";
}
else
{
echo"<table width="100%"><tr>";
while($galleries=mysql_fetch_array($gerard))
{
$title=$galleries["title"];
 
$img=$galleries["img"];
$id=$galleries["id"];
echo'<td width="25%"><div align="center" class="gallery"><a href="http://ursite.tld/galleries/display.php?id=$id"><img src="http://ursite.tld/galleries/images/$img" height="40" weight="40" alt="$title" /></a></div></td>';
}
echo"</tr></table>";
}
} ?>


Now, anywere U nid it

Put <?php include("photos.php"); ?> bt it must b in d same directory! Or if nt use dis
<?php include("../photos.php"); ?>
Pls dnt 4get to change d table name et its columns i just gues dat.

‹‹12››
Viewing Page 1 of 2 pages