Trying to open a chart with form action tag and a url. I want to send values from submit form and use it in the url. I don't know if it's possible to pass the values to the form action tag from isset($_POST['Posted'])?? Ex code:
<form action="<?php echo 'http://chart.apis.google.com/chart?cht=lc&chd=e:nE98.g&chxt
=x,y&chxr=1,0,4000&chs=600x200&chl=October|Novembe r'; ?>" target="_self" method="post">
This works if it's static!
But I need it to be dynamic like this:
//if submit in form
if(isset($_POST['Posted']))
{
$data="e:nE98.g";
$month_arr[0]="October";
$month_arr[1]="November";
}//end isset form
<form action="<?php echo 'http://chart.apis.google.com/chart?cht=lc&chd=' . $data . '&chxt=x,y&chxr=1,0,4000&chs=600x200&chl=' . $month_arr[0] . '|' . $month_arr[1]; ?>" target="_self" method="post">
<input type="submit" name="Posted" value="Select" />
</form>
What's wrong with the code above, can't see why it's not working. Is it impossible to pass values to form action tag or is it something wrong with the url string?
thanks,