Hi,
I am trying to create a simple form that, when submitted, will
uncompress a string entered in a textarea using gzuncompress.
The entire HTML is below:
<?php
if (isset($_GET['action'])) {
if ($_GET['action'] == "decompress ") {
$newtext = gzuncompress(st ripslashes($_PO ST['textarea']));
}
}
?><html>
<head>
</head>
<body>
<form name="form1" method="post"
action="gzdecom press.php?actio n=decompress">
<textarea name="textarea" rows="8"><?php if (isset($newtext )) echo
$newtext; ?></textarea>
<br>
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>
To simplify things for now I have just been trying to use a very basic
string:
xœËHÍÉÉ, - which is the result of gzcompress("hel lo")
Unfortuntely it stumbles on the line that reads:
$newtext = gzuncompress(st ripslashes($_PO ST['textarea']));
Giving the following error:
Warning: gzuncompress(): data error in
/home/martyn69/public_html/test/gzuncompress.ph p on line 5
Why can it not decompress it?
Cheers
Burnsy
I am trying to create a simple form that, when submitted, will
uncompress a string entered in a textarea using gzuncompress.
The entire HTML is below:
<?php
if (isset($_GET['action'])) {
if ($_GET['action'] == "decompress ") {
$newtext = gzuncompress(st ripslashes($_PO ST['textarea']));
}
}
?><html>
<head>
</head>
<body>
<form name="form1" method="post"
action="gzdecom press.php?actio n=decompress">
<textarea name="textarea" rows="8"><?php if (isset($newtext )) echo
$newtext; ?></textarea>
<br>
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>
To simplify things for now I have just been trying to use a very basic
string:
xœËHÍÉÉ, - which is the result of gzcompress("hel lo")
Unfortuntely it stumbles on the line that reads:
$newtext = gzuncompress(st ripslashes($_PO ST['textarea']));
Giving the following error:
Warning: gzuncompress(): data error in
/home/martyn69/public_html/test/gzuncompress.ph p on line 5
Why can it not decompress it?
Cheers
Burnsy
Comment