|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-06-24 11:22 UTC] d58m at hotmail dot com
Description: ------------ OS: windows 2000 professional software used: Apache2.2 PHP5.2.3 Browser: IE 6.0.2800.1106 1. Type the address into the address: http://localhost/test/s.php and pressed return. 2. I get a blank page in the browser no text display in the browser. 3. Right clicked on the page and get the code in the "Reproduce code: form". It should be the code in the "Actual result: form" tech. I was working up to 25/05/07 then it stopped. Reproduce code: --------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD> <BODY></BODY></HTML> Expected result: ---------------- <marquee>site under construction</marquee><br /> <a href="index.html">link to index page </a> Actual result: -------------- -------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <marquee>site under construction</marquee><br /> <a href="index.html">link to index page </a> </body> </html> PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 02:00:01 2025 UTC |
I am working my way through a book called PHP 5 in easy steps ISBN 1-84078-282-x very basic, my webpage teacher recommended. ---------------------------------- I have typed this programme and get an error: The page cannot be displayed. <?php phpinfo();?> --------------------------------- This programme in two parts will generate the bug that I report to you. <html> <head> <title>Calculation Form</title> </head> <body> <form action = "calc.php" method = "post"> Value 1: <input type = "text" name = "val1" size = "10"> Value 2: <input type = "text" name = "val2" size = "10"> <br> Calculation: <br> <input type = "radio" name = "calc" value = "add"> Add <input type = "radio" name = "calc" value = "sub"> Subtract <input type = "radio" name = "calc" value = "mul"> Multiply <input type = "radio" name = "calc" value = "div"> Divide <hr> <input type = "submit" value = "Calculate"> <input type = "reset" value = "Clear"> </form> </body> </html> ----------------------------- <!-- example for PHP 5.0.0 final release --> <html> <head> <title>Calculation Result</title> </head> <body> <p> <?php $val1 = $_POST['val1']; $val2 = $_POST['val2']; $calc = $_POST['calc']; if( is_numeric( $val1 ) && is_numeric( $val2 ) ) { if( $calc != null ) { switch( $calc ) { case "add" : $result = $val1 + $val2; break; case "sub" : $result = $val1 - $val2; break; case "mul" : $result = $val1 * $val2; break; case "div" : $result = $val1 / $val2; break; } echo( "Calculation result: $result" ); } } else { echo( "Invalid entry - please retry" ); } ?> </p> <p> </p> <p> </p> <p><a href="calc.html">Calc</a></p> </body> </html>