Jump to content

Users Not Displaying other controls are?


Go to solution Solved by jack7076,

Recommended Posts

Here in the attached file shows that my users are not showing but activation and deactivation is showing.

 

Please help

Thanks in advance

-- Jack

post-192156-0-90108200-1452733460_thumb.png

SRC CODE:

I have defined a Conection to my DB

@mysql_connect("URL to DB","My user","MY PASS","DB") or die("Failed to connect to MySQL: " . mysql_error());

//List Users
mysql_select_db("a4823842_1");
$list_query = mysql_query("SELECT * FROM username");
while($Users = mysql_fetch_array($list_query)){
    $u_username = $Users['username'];
    $u_type = $Users['type'];

?>

<tr><td class='listuseradmin'><?php echo $Users['username']; ?></td><td><?php if($u_type == 'a'){
    echo '<a href="">Deactivate</a>';
}
else{
    echo '<a href="">Activate</a>';
}
}
}

?>
</td>
</tr>
</table>

Edited by jack7076
Link to comment
https://forums.phpfreaks.com/topic/300317-users-not-displaying-other-controls-are/
Share on other sites

then the most likely cause would be empty data in that column or data that looks like a html tag (has < > around it) so that it doesn't display anything.

 

are you sure you have data in that column? could you have executed a query that cleared all the user names/set them to empty strings?

 

what does the 'view source' of the output in your browser show?

yes it is

 

so, that was a lie.  :psychic:

 

someone took the time to ask you if the spelling and capitalization matched the column name. they didn't do that because they needed practice typing. that was asked because the spelling and capitalization must be correct for your code to work.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.