IE7 PHP form $_POST variables headache
Posted: Tue May 25, 2010 12:06 am
I'm including just the basic snippets of code from "View Source" that is generated by 2 PHP form pages. The calling PHP page requests that a user click on someones last name and that button click is a submit to the calling form. The value passed in the value= "107" is the customer ID # as a string. The value that comes out of the called form is the selected name, (Diana Walker), rather than the button value, that appears as you can see below. The code works fine with FF and IE8. The onmouseover and onmouseout classes are included in the stylesheet linked in the head section.
Calling PHP form HTML source code:
<!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" />
<link href="css/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form action="staff_search_one_employee.php" method="post" >
<button name="passed_employee_id" type="submit" value="107" class= "emp_button_reg" onmouseover="this.className='emp_button_over'" onmouseout="this.className='emp_button_reg'">Diana Walker</button>
</form>
</body>
</html>
Called PHP form HTML source code:
<!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" />
<link href="css/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
passed Employee ID =Diana Walker
( the PHP code that produced this is the following :
$passed_employee_id=$_POST['passed_employee_id'];
echo "passed Employee ID =".$passed_employee_id;)
</body>
</html>
Calling PHP form HTML source code:
<!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" />
<link href="css/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form action="staff_search_one_employee.php" method="post" >
<button name="passed_employee_id" type="submit" value="107" class= "emp_button_reg" onmouseover="this.className='emp_button_over'" onmouseout="this.className='emp_button_reg'">Diana Walker</button>
</form>
</body>
</html>
Called PHP form HTML source code:
<!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" />
<link href="css/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
passed Employee ID =Diana Walker
( the PHP code that produced this is the following :
$passed_employee_id=$_POST['passed_employee_id'];
echo "passed Employee ID =".$passed_employee_id;)
</body>
</html>