I am passing a form field in JavaScript to a PHP function. The problem is when the parameter gets inside the PHP function the value is set to 1 when it should be a relative path to a file.
setup_config.php:
<script type="text/javascript">
function install(){
...
Install.ExecuteDBScript(document.getElementById('path').value, document.getElementById('self-serve').checked, function (result)
{
alert("result = " + result);
... }
}
install.class.php:
function ExecuteDBScript($path, $selfserve, $check=0) {
$tspace = "CREATE TABLESPACE ".$schema." DATAFILE
'".addslashes($path)."\\$schema.DBF' SIZE 2M AUTOEXTEND ON NEXT 2M MAXSIZE UNLIMITED
LOGGING
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT MANUAL
FLASHBACK ON";
return $path;
}
The alert displays a 1. Any ideas why?