_post inside a function
Posted: Thu Jul 01, 2010 12:10 am
i know with functions i need to pass my variables into the function but how about this situation. it doesnt seem to work
ive got a few forms and i want to use 1 function to deal with them (each having a different button so i tried
id like it to echo the info from the text box called field1 as well as work with different buttons from different forms
ive got a few forms and i want to use 1 function to deal with them (each having a different button so i tried
Code: Select all
function try($button){
if(isset($_POST['$button'])){
$field1=$_POST['field1'];
echo $field1." was inserted when ".$button." was pressed";
}
}
try(help);