otuatail Posted April 16, 2009 Share Posted April 16, 2009 Hi I am trying to retreave a value from a previouse p[osted page. Problem is it is encripted. <form action="upload.php" method="post" enctype="multipart/form-data"> <input type="text" name="F"> <input type="submit" name="submit" value="Submit" /> </form> -------------- echo("Value " . $__FILES["Friend"]); tried $_POST and $_GET There must be a way to retreve this. works with a normal post. Link to comment https://forums.phpfreaks.com/topic/154387-how-to-get-a-value-from-a-posted-page/ Share on other sites More sharing options...
otuatail Posted April 16, 2009 Author Share Posted April 16, 2009 I ment echo("Value " . $__FILES["F"]); tried $_POST and $_GET There must be a way to retreve this. works with a normal post. Link to comment https://forums.phpfreaks.com/topic/154387-how-to-get-a-value-from-a-posted-page/#findComment-811740 Share on other sites More sharing options...
.josh Posted April 16, 2009 Share Posted April 16, 2009 so... $_POST['F'] doesn't work for you? Link to comment https://forums.phpfreaks.com/topic/154387-how-to-get-a-value-from-a-posted-page/#findComment-811742 Share on other sites More sharing options...
PFMaBiSmAd Posted April 16, 2009 Share Posted April 16, 2009 I want to know what makes you think something from that form is encrypted? Link to comment https://forums.phpfreaks.com/topic/154387-how-to-get-a-value-from-a-posted-page/#findComment-811746 Share on other sites More sharing options...
otuatail Posted April 16, 2009 Author Share Posted April 16, 2009 what does enctype mean then. <html> <body> <form action="upload.php" method="post" enctype="multipart/form-data"> Name:<br> <input type="text" name="val" value="XXX"> e.g. Becky , Colin , My Party <br><br> <label for="file">Filename:</label><br> <input type="file" name="file" id="file" /> <br><br> <input type="submit" name="submit" value="Submit" /> </form> </body> </html> <?php include ("ftpInclude.inc"); connectDB(1); echo("Value " . $_FILES["val"]); if ( (($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "mage/bmp") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/pjpeg") || ($_FILES["file"]["type"] == "application/pdf") || ($_FILES["file"]["type"] == "application/vnd.ms-powerpoint") || ($_FILES["file"]["type"] == "application/vnd.openxmlformats-officedocument.presentationml.presentation") || ($_FILES["file"]["type"] == "application/msword") || ($_FILES["file"]["type"] == "application/vnd.openxmlformats-officedocument.wordprocessingml.document") || ($_FILES["file"]["type"] == "application/vnd.ms-excel") || ($_FILES["file"]["type"] == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") || ($_FILES["file"]["type"] == "text/plain") ) && ($_FILES["file"]["size"] < 2000000)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { $real = $_FILES["file"]["name"]; $GetName = ServerName($_FILES["file"]["name"]); move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $GetName); echo "Stored in: " . "upload/" . $GetName; $sqlFtp = "INSERT INTO ftp (RealName,FrendlyName,ServerName) VALUES ('" . $real . "', 'Desmond' , '" . $GetName . "')"; $query = mysql_query($sqlFtp); $result = mysql_affected_rows(); echo $result; } } else { //echo "Invalid file"; } ?> Link to comment https://forums.phpfreaks.com/topic/154387-how-to-get-a-value-from-a-posted-page/#findComment-811764 Share on other sites More sharing options...
.josh Posted April 16, 2009 Share Posted April 16, 2009 you use it for elements like file type. But your OP did not show that other stuff in there. All you had was a text field, hence PFM's question. Link to comment https://forums.phpfreaks.com/topic/154387-how-to-get-a-value-from-a-posted-page/#findComment-811766 Share on other sites More sharing options...
PFMaBiSmAd Posted April 16, 2009 Share Posted April 16, 2009 Enctype means encoding type, as in mime encoding type. It's nothing to do with encripted/encrypted anyway. Link to comment https://forums.phpfreaks.com/topic/154387-how-to-get-a-value-from-a-posted-page/#findComment-811799 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.