How do i check posts value? seems im doing it wrong-it always goes to elses, even if $_POST['R\W'] does equal rPHP Code:<?php
[B]If(($_POST['R\W']) == 'r'){[/B]
$contents = @fopen($_POST['file'], "r") or die("Error opening1");
$reading = fread($contents, filesize($_POST['file'])) or die("Error Reading");
@fclose($_POST['file']);
echo $_POST['file'],"/n",$reading;
} Else {
$contents = @fopen($_POST['file'], "w") or die("Error opening2");
@fwrite($contents,"New file created") or die("Error writing");
@fclose($_POST['file']);
}
?>
thanks![]()





Reply With Quote