please take a look a the script and the document to see what i’m doing wrong its not outputting the right information
[code]<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head>
<title>gt</title>
</head>
<body>
<form method=”post” action=”display_input.php”>
<p><strong>text field:</strong><br>
<textarea name=”text1″ cols=45 rows=5 wrap=virtual></textarea></p>
<P><strong>string function :</strong><br>
<input type=”radio” name=”func” value=”md5″> get md5<br>
<input type=”radio” name=”func” value=”strlen”> get length of string<br>
<input type=”radio” name=”func” value=”strrev”> reverse the string<br>
<input type=”radio” name=”func” value=”strtoupper”> make string uppercase<br>
<input type=”radio” name=”func” value=”strtolower”> make string lowercase<br>
<p><input type=”submit” name=”submit” value=”do sumhing”></p>
</body>
</html>[code]
<?php
if(($_post[text1]==””)||($_post[func]==””))
{
header(“location:generic_form.html”);
exit;
}
$result= $_post[func]($_post[text1]);
?>
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head>
<title>generic input results</title>
</head>
<body>
<?echo “$result”;?>
<P><a href=”generic_form.html”>go again!</a></p>
</body>
</html>