Variable that calls the values that is insert into a table

Can anyone show me how to make a variable that calls the exact value inserted into a table? Because I only know to call from a textbox, like this:

$name = $_POST['txtname'];
$gender = $_POST['txtgender'];

but what would be the codes if I will call the exact inserted value from a table?

$name = ?;
$gender = ?;

thanks in advance.

You can’t get value from a table. Tables are not “input” elements. However you can get a value from “textarea”. See here:

Are you talking about values from a HTML table, as @petervasilev suspects, or are you by any chance talking about a database table?

I’m talking about in the database sorry for not mentioning.
By the way, this is my codes:

for ($i=0; $i<sizeof($checkbox);$i++){
$sql2=“INSERT INTO tbltems SELECT NULL , '”.$checkbox[$i].“’ , id FROM tblName WHERE fname = '”.$fname.“’ AND lname = '”.$lname.“'”;

Is your question related to your other current post?

If it is not, can you try and describe it a little better – I will be honest, I cannot make sense of this question at all.

Maybe someone else can help?

yes it is.