How to get row ID in button click?

前端 未结 3 1588
不知归路
不知归路 2021-01-28 13:49

I have a table that I fill with records from the database. What I want to do when the view button is clicked is to be able to get the ID of the row so that I can call on the oth

3条回答
  •  时光取名叫无心
    2021-01-28 14:45

    You could make little forms for each button but I prefer hyperlinks that I then style to look like buttons:

    
    
    ";
    }
    ?>
    

    You can do more with the CSS but that should give you the right idea.

    提交回复
    热议问题
    ID Username Email Telephone Date Registered Member Details
    "; echo $row['ID']; echo ""; echo $row['Username']; echo ""; echo $row['Email']; echo ""; echo $row['Telephone']; echo ""; echo $row['RegisterDate']; echo ""; print '
    View
    '; echo "