In short
I'v been searching for more than 3 hours now... I'm tired of it...
"
function verify_data($formdata)
{ $error = "";
$form_data = trim_data($formdata); // Clear all white space in the fields
$insert_check = insert_data($formdata); // Inserting data into table
if ($insert_check != "true")
return($insert_check);
return("");
}
"
trim_data is in : include("./intranet_admin_idb.php");
this he calls, NP so far
<?php
function trim_data($formdata) // Get all the white spaces out off the fields
{ foreach($formdata as $key => $value)
{ $key = trim($key);
$value = trim($value);
}
return $formdata;
}
?>
So
when I enter a string in a textbox like " test g"
I tried a print in the trim_data and it trims it to 'test g"
what it is suppose to do...
but getting back to the main page, where I call trim_data, it isn't changed, I don't know why?
is it because it's in an include?
pleaze help me... I'm so tired of this... pfff
I would really appreceate it, I've searched everywhere...