Eth
07-29-2008, 05:46 AM
I am making a Flash/PHP form, the text inputs are of type input and I am using $_POST method on a server, not local. When I press the button, the variables are sent but what the results obtained in PHP is the code for the input text box such as...
<?php
//File being written to
$filename = "triple_rlc_result.CKT";
//Get capacitors
$c1 = $_POST['c1'];
$c2 = $_POST['c2'];
$c3 = $_POST['c3'];
//Open file
$fo = fopen( $filename, 'w' ) or die( "Unable to open file." );
//Write title
$string = "*Writing to the filename, " . $filename . " \r\n";
fwrite( $fo, $string );
//Write capacitors
$string = "C1 7 0 " . $c1 . "P\r\n";
fwrite( $fo, $string );
$string = "C1 6 0 " . $c2 . "P\r\n";
fwrite( $fo, $string );
$string = "C1 5 0 " . $c3 . "P\r\n";
fwrite( $fo, $string );
fclose( $fo );
?>
The output file looks like this...
*Writing to the filename, triple_rlc_result.CKT
C1 7 0 <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Times New Roman\" SIZE=\"12\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">10</FONT></P></TEXTFORMAT>P
C1 6 0 <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Times New Roman\" SIZE=\"12\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">10</FONT></P></TEXTFORMAT>P
C1 5 0 <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Times New Roman\" SIZE=\"12\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">10</FONT></P></TEXTFORMAT>P
So $c1 = <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Times New Roman\" SIZE=\"12\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">10</FONT></P></TEXTFORMAT>P ???
What is going on here? Any thoughts? Thanks
<?php
//File being written to
$filename = "triple_rlc_result.CKT";
//Get capacitors
$c1 = $_POST['c1'];
$c2 = $_POST['c2'];
$c3 = $_POST['c3'];
//Open file
$fo = fopen( $filename, 'w' ) or die( "Unable to open file." );
//Write title
$string = "*Writing to the filename, " . $filename . " \r\n";
fwrite( $fo, $string );
//Write capacitors
$string = "C1 7 0 " . $c1 . "P\r\n";
fwrite( $fo, $string );
$string = "C1 6 0 " . $c2 . "P\r\n";
fwrite( $fo, $string );
$string = "C1 5 0 " . $c3 . "P\r\n";
fwrite( $fo, $string );
fclose( $fo );
?>
The output file looks like this...
*Writing to the filename, triple_rlc_result.CKT
C1 7 0 <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Times New Roman\" SIZE=\"12\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">10</FONT></P></TEXTFORMAT>P
C1 6 0 <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Times New Roman\" SIZE=\"12\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">10</FONT></P></TEXTFORMAT>P
C1 5 0 <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Times New Roman\" SIZE=\"12\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">10</FONT></P></TEXTFORMAT>P
So $c1 = <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Times New Roman\" SIZE=\"12\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">10</FONT></P></TEXTFORMAT>P ???
What is going on here? Any thoughts? Thanks