File:  [mozdev] / check4change / www / testphp.php
Revision 1.34: download - view: text, annotated - select for diffs - revision graph
Wed Nov 22 15:19:55 2006 UTC (11 years ago) by ronen
Branches: MAIN
CVS tags: HEAD
no message

<html>
<body>

<?php

//phpinfo();

/*
$con = mysql_connect();
if (!$con) {
  echo('Could not connect: ' . mysql_error());
} else {
  echo('DB OK');
}
*/


$file=fopen("protected/edit.html","r") or exit("Unable to open file!");
//$file=fopen("/mozdev/sandbox/data/helm/htdoc/check4change/www/testphp.php","r") or exit("Unable to open file!");
//$file=fopen("/mozdev/sandbox/data/helm/htdoc/check4change/www/hello.data","ab") or exit("Unable to open file!");

//$res = fwrite($file, "Test message");
//echo('written '.$res.' bytes to file');



while(!feof($file))
  {
  echo fgets($file). "<br />";
  }



//fclose($file) or exit("Can't close file");

$ref=@$HTTP_REFERER;
echo "<font face='Verdana' size='3'><b>Referrer of this page  = $ref </b><br>";
echo "<font face='Verdana' size='3'><b>POST data  = {$_POST['message']} </b>";

?>

<h1>Feedback Form</h1>

    <form method="post" action="testphp.php">

    <strong>Message:</strong>
    <br>
    <textarea name="message" rows="15" cols="40"></textarea><br>
    <br>
    <input type="submit" value="Send Feedback" />


    </form>



</body>
</html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>