PHP onclick get text and make a variable
<p>Goal: I want to get the text from the selected element and then create a PHP variable from it. </p>

<p>I know how to do this using jQuery but can't wrap my mind around the idea of how to do it in PHP. Basically lets say I have a table with some data. When the user clicks on the data I would like to retrieve that text and then place it in a PHP variable. I could use .text(); from jQuery to create the variable but I could not pass that variable into PHP for further use. </p>

<p>I am very new to PHP (a front-end developer trying to learn back-end). So any explanation would be helpful also. </p>

<p>thanks!</p>

<p>***OK I now understand how to do it. Thanks for the input. I was not thinking. It makes perfect sense to create the variable using a _post and then returning the data via AJAX. Sorry for wasting your time. Thanks for replying. </p>
