ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  chart problem
Posted by M_Jay on Feb-07-2011 15:21
I want to pass $month and $POST['sex'] variables to chart1.php and want to get those 2 variables values inside chart1.php to create a chart.


I have assigned a value to $month variable from another file.(Qua_Analysis.php):

<form action ="Qua_Main.php?selectm=<?php echo $month1?>"  method="POST">
<input type="submit" name="Submit" value="Filter"/>
</form>




Qua_Main.php
*************
<?php
$month = $_GET['selectm'];
?>
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<table>
<tr>
<td>
<A href ="Qua_Analysis_Default.php"><input type="button" value="Reset" /></A>
</td>
</tr>
<tr><td>
<form action="chart1.php?mo1=<?php echo $month?>" method="POST">
<label for="sex">Select Gender:</label>
<input type="radio" name="sex" value="M1" /> Male
<input type="radio" name="sex" value="M2" /> Female
<input type="submit" value="Filter" />
</form>
</td></tr>
</table>
<table>
<tr>
<td></td><td>
<table><tr>
<td style="background-color:#FF0000" width="5" height="2">
Economy</td></tr>
<tr><td style="background-color:#009933" width="5" height="2">
HealthyLifestyle
</td></tr>
<tr>
<td style="background-color:#0066CC" width="5" height="2">
Urban Growth
</td></tr>
<tr>
<td style="background-color:#CCCC00" width="5" height="2">
Transport
</td></tr>
<tr><td style="background-color:#993399" width="5" height="2">
Crime&Safety
</td></tr>
<tr>
<td style="background-color:#0099CC" width="5" height="2">
Commiunity
</td> </tr>
<tr>
<td style="background-color:#996600" width="5" height="2">
Environment
</td></tr>
<tr>
<td style="background-color:#CCCCCC" width="5" height="2">
Education
</td></tr>
<tr>
<td style="background-color:#663333">
Public Health
</td></tr>
<tr><td><input type="submit" name="Submit" value="Track" /></td></tr>
</table>
</table>

</body>
</html>

  Re: chart problem
Posted by Peter Kwan on Feb-07-2011 23:31
Hi M_Jay,

This problem does not seem to be related to ChartDirector, but is just general HTML programming.

According to HTML standard, you cannot put query parameters in the URL in FORM POST. Please modify your code so that the parameter is not passed in the URL. For example, you may pass the parameter as a hidden field using POST, as a cookie, as PHP session variables, or using any other method that compiles to the HTML standard.

Hope this can help.

Regards
Peter Kwan