Hi,
I'm new to PHP. I followed an example on the book and wanted to pass a variable
from one html page to a php page, but it always tells me the passed variable is
undefined. I've checked the syntax over and over again, but I couldn't find the
problem. I also tried to change POST to SUBMIT and noticed the value of the
variable can be passed. Why can't the target php catch it??? The code is as
following, can any one please kindly help me out?
Very much appreciated!
----------------------HOME.htm----------------------------------------------------
<html >
<head>
<script language="JavaScript" type="text/javascript">
function book(show) {
if (!show.contains(event.toElement)) {
document.showList.where.value = show.name;
document.showList.submit();
}
}
</script>
</head>
<title>Home</title>
<body>
<form name="showList" method="POST" action="test.php">
<input type="hidden" name="where">
<input type="button" value="BOOK" name="LaBotieII" onClick="book(this)">
</body>
</html>
-------------------------------TEST.php----------------------------------------------
<html >
<head>
</head>
<title>TEST</title>
<body>
<?php
include("connection.php"); //connect to a database
connect();
echo($whichVenue); //error message "whichVenue is undefined"
$ven =whichVenue; //error message "whichVenue is undefined"
?>
</body></html>