I have a certain script for Feed back.
<p>I have a certain script for Feed back. when i submit the form, it shows</p>

<p>"
Warning: substr() expects parameter 2 to be long, string given in /home/jetkvdmn/public_html/genFunctions.php on line 26"</p>

<p>the code below</p>

<pre><code>&lt;?php
$cEpro ="&amp;copy; Redeeming Mission 2012.";

function checkText($ElementVal) {
    // If Text is too short
    if (strlen($ElementVal)&lt; 3) {
        //alert('Text too small');
        return false;
    } else{
        return true;
    }
}


function checkEmail($vEmail) {   
    $invalidChars ="/:,;" ; 
    if(strlen($vEmail)&lt;1) return false;             // Invalid Characters
    $atPos = stripos($vEmail,"@",1);                // First Position of @

    if ($atPos != false) 
        $periodPos = stripos($vEmail,".", $atPos);  //If @ is not Found Null . position

    for ($i=0; $i&lt;strlen($invalidChars); $i++) {    //Check for bad characters 
        $badChar = substr($invalidChars,i,1);       //Pick 1
        if(stripos($vEmail,$badChar,0) != false)    //If Found
            return false;
    }

    if ($atPos == false)                            //If @ is not found
        return false;       
    if ($periodPos == "")                           //If . is Null
        return false;
    if (stripos($vEmail,"@@")!=false)               //If @@ is found
        return false;
    if (stripos($vEmail,"@.") != false)             //@.is found
        return false;
    if (stripos($vEmail,".@") !=  false)            //.@ is found
        return false;

    return true;    
}
?&gt;
</code></pre>
