Help with this? It is confusing to me...

rbxlmadx

Member
Messages
32
Reaction score
1
Points
8
So here we have this script:

$result = mysql_query("SELECT Users FROM days WHERE ID = '1'");
while ($row = mysql_fetch_object($result)) {
echo "<center>$row->Users</center>";
}


$row->Users shows the amount of users which is 0 when I am on my homepage, so that works, but now, I want to insert that $row->Users into a img url, like this:

<img src='http://www.example.com/e?e='$row->Users''>

Now I obviously know that when I am putting it in the link that it should look something like that. Anyway, I don't know how to do it, it gives me an error everytime...
 

andylpsx

New Member
Messages
29
Reaction score
1
Points
3
Since this is PHP HTML doesn't render the code in and instead your URL would be http://www.example.com/e?e=$row->user try using something like:

Code:
<?php

echo "<img src='htttp://www.example.com/e?e=" .  $row->Users . "' >";
?>
Tell me if this works.
 
Last edited:
Top