Problem with profile view

I do not know how to create when a user posts a post on his profile to show a link for likes to this status or I like

Then you should read up link creation in the documentation

https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/HTML_basics#Links

but i’m working with php code, i want to show me the link that I click for liking this or i like it

$allfromposts=mysqli_query($db,"SELECT * FROM posts WHERE name= '$name' order by id desc");

while($row=$allfromposts->fetch_assoc()) {

echo '<u><b>'.$row['name'].'</b></u><br/>';
echo '<small>'.$row['date'].'</small><br/><br/>>><big><u><font color="blue">
'.$row['text'].'</font></u></big><br/><br/>
<small>all Likes ('.$row['numberoflikes'].')</small>
<br/>';
/////it was not clicked by the current user, this should appear - >>
echo '<small><a href="addLike.php?name='.$name.'&id='.$row['id'].'"><b>Add like</b></a>';
/////
<b>or to show me the text I love this </b>
}

Please, can you put the code inside a code block?
Check it here https://commonmark.org/help/

/////it was not clicked by the current user, this should appear - >>
echo ‘Add like’;
/////

just fill it up with code

if(!$clickedByCurrentUser){ echo 'SEE DOCUMENTATION ABOVE'; }

I have two tables in miskl, first with profileinfo, another with like, I have to find id posts from profileinfo, where id likes

I have to select the id number from the profileview table where the id is the number of the table likes, because I added that when someone likes some status, the entries in the table likes id number from the profile view,and i must to find if is same id number from table profil view with table likes,

select id from profile where id = ? // ? = like-id

Thank you,it working

Sponsor our Newsletter | Privacy Policy | Terms of Service