The problem that I now have is that I wnat to perform a function from within another function, but cannot find how to do it. It is probably because I can't work out what to search for in the Forum.
I have a form from which users can search an LDAP database for details of members of staff. As LDAP still only recognises T.61 encoded characters, I need the ability in the script to convert any czech characters that a user may use.
I used ereg to do the conversion and placed the code at the points within the script that the user could input a request. This worked fine, but I want to avoid the same code numerous times within a script, so I placed the necessary ereg code within a function and want to call this function anytime I require the ability to convert characters.
My coding is as follows
Conversion Function
function konvert_pismena()
{
global $HTTP_GET_VARS;
if (ereg("[a-zA-Z0-9]",$value))
{
value=ereg_replace("ì","e",$value);
etc.
}
}
Processing function
function process_form()
{
global $HTTP_GET_VARS;
global $PARAM
while (list($key, $value) = each (HTTP_GET_VARS))
{
if (!empty($value))
if ($value)!=OK)
if ($value)!=results)
{
konvert_pismena ();
etc.
If I replace the konvert_pismena in the processing function with the code from the conversion function it works ok.
I know that it enters the konvert_pismena function, but no conversion takes place.
Can you help me please.
Thanks
Tony