passing values between .php pages
Posted: 21. May 2015 09:51
I have to pass a file for uploading to another page which will validate and insert to a table in conjuction with a literal field which has a well defined value.
In the other page, before perform any action, since the passed hidden type fied results always blank
I put there the statementQ
Pls any help cause I'm driving crazy about this think. Thanks in advance!
- Code: Select all
<?php
$hidden_field = 'test";
echo "<form action=\"upload_file.phpl" target=\"_blank\">";
echo "<table align =] "cente]r" width =\ "50%\">";
echo "<tr align = \"center\">";
echo "th align =\ "cente\r"> select file</th>";
echo "<td><input type=\"file\" name=\"datafile\" size=\"40\"</td>";
echo "</tr>";
echo "<tr align = \"center\">";
echo "<th align = \"center\">comment</th>";
echo "<td><input type="hidden" name=\"hidden_field\" value=\"$hidden_field\"</td>";
echo "</tr>
echo "<tr align = "center">
echo "<td><br><br></td>
echo "<td><input type="submit" name="submit" value="Submit"></td>
echo "</tr>
echo "</table>
echo "</form>
?>
In the other page, before perform any action, since the passed hidden type fied results always blank
I put there the statementQ
- Code: Select all
<? php
$l_value = $_GET['hidden_field'];
// echo $l_value returms always blank/empy content
/* and so on ...
the datafile variables concerning their passed values reulting to be correct, according their further evaluation and insertion to the table...
*/
Pls any help cause I'm driving crazy about this think. Thanks in advance!