PX : code

PHP Testbed by Michael Hesselbach
Download this code


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>PHP3 Testbed</title>
</head>
<!---------------------------------------------------------------------------
     Put this file (index.php3) into a subdirectory of your choice 
     and create a writeable file called test.php3 there
----------------------------------------------------------------------------> 
<body bgcolor="#C0C0C0" vlink="#000080" alink="#008080">

<p align="center"><font face="Arial">
Enter your PHP code here :</font></p>

<?
if ($Reset)
 $S1 = "";

$f = fopen("test.php3","w");
// on problems: test.php3 should exist already with chmod 666
 if ($f) fwrite($f, $S1);
 if ($f) fclose($f);

?>

<form method="POST">
    <center>
    <textarea name="S1" rows="8" cols="66"><? echo("$S1"); ?> 
    </textarea>
    <p><input type="submit" name="Test" value="Test">
       <input type="submit" name="Reset" value="Reset">
    </p>
    </center>
<!-- Not needed here: 
? // pass step value to next call
$step += 1; 
echo "<input type=\"hidden\" name=\"step\" value=\"$step\" <br> ";
? -->

</form>

Result:
<hr>
<?
include "test.php3";
?>
<hr>
</body>
</html>

Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.