Hello All,
Can anyone tell me why line 40 (//this is line 40) will not return upper case when passed to a variable and printed in line 50? thanks.
Can anyone tell me why line 40 (//this is line 40) will not return upper case when passed to a variable and printed in line 50? thanks.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title> Test form </title>
<style type="text/css" media="screen">.number {font-weight: bold;} </style>
</head>
<body>
<form action="textform.php" method="post">
<p> First Name <input type="text"
name="firstname" size="20" /></p>
<p> Last Name <input type="text"
name="lastname" size="20" /></p>
<p> Job Title Code (GM, MGR, PGM, or PM) <input type="text"
name="jobtitle" size="4" /></p>
<p> Department <input type="text"
name="department" size="6" /></p>
<input type="submit" name="submit"
value="Submit" />
<h1> Test Form </h1>
<?php
/* This script takes values from above and use them in the function below. */
//
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$department=$_POST['department'];
//$department=strtoupper($_POST['department']);
//format_dept
//function format_dept(strtoupper$department) {
function format_dept($department) {
return strtoupper($department) ; //this is line 40
}
//print result
print "<div><p>
First Name :<span class=\"number\">$firstname</span><br />
Last Name :<span class=\"number\">$lastname</span><br />
Department : <span class=\"number\">$department</span></p></div>" //this is line 50
?>
</body>
</html>