how to make an html tag value a php variable?
Posted: Mon Dec 28, 2009 11:52 am
Hello everyone,
I am lost this is the problem.
I am creating a group of html form checkboxes and if any of them are outputted i am sending the values to a php array..
this will output 5 checkboxes and each box should have a value of $i so that when array $eraseThis IS accessed, if any of the checkboxes were checked the array will contain the value of the box's selected.
the value is not going through how can i get the html value to be a php variable?
I am lost this is the problem.
I am creating a group of html form checkboxes and if any of them are outputted i am sending the values to a php array..
Code: Select all
echo '<form action="<span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span>.php" method="post" />';
for ($i=0; $i<5; $i++)
{
echo '<input type="checkbox" name="$eraseThis[]" value="$i">';
}
echo '</form>';
the value is not going through how can i get the html value to be a php variable?