I have this code but every time the button is clicked it directs to just story.php
neglecting the other details.
I've tried using javascript but it seems using form action is the nearest possible way for me to achieve this:
<form action='./story.php?u=$id'><button type='submit' class='w3-button w3-theme-d1 w3-margin-bottom'><i class='fa fa-thumbs-up'></i>$likes Like</button>
<button type='submit' class='w3-button w3-theme-d2 w3-margin-bottom'>
</form><i class='fa fa-comment'></i> Comment$comments</button>