I have a form with a php script as follows:
$doctitle ={doctitle};
$words = explode(" “,$doctitle);
$d = ‘’;
if(substr($doctitle,0,1)>=“0” and substr($doctitle,0,1)<=“9”){
$d = $words[0]; // New value
}
else{
$i=0;
while($i < count($words)) {
$d .=ucwords(substr($words[$i],0,1));
$i++;
}
}
$check_table = ‘idl’; // Table name
$check_where = “docid = '”.$d.”’"; // Where clause
$di = $d;
$i=0;
do{
$check_sql = ‘SELECT *’
. ’ FROM ’ . $check_table
. ’ WHERE ’ . $check_where;
sc_select(dataset, $check_sql);
if (false == {dataset})
{
// Error while accessing database
echo “Access error. Message =”. {dataset_error};
}
elseif ({dataset}->EOF)
{
// No record found
}
else
{
// Record found
$i++;
$di=$d.($i);
$check_where = “docid = '”.$di."’"; // Where clause
}
}while(!{dataset}->EOF);
$d=$di;
$master_field = ‘docid’; // Field name on the master application
$master_value = $d; // New value
// Set master value
sc_master_value($master_field, $master_value);
It works perfectly in scriptcase but when I deploy to the production server the script simple doesn’t work. Any help would be appreciated greatly.