cugopob.vlad Posted March 6, 2009 Report Share Posted March 6, 2009 can somebody please help me im trying to use stripos in my site but it keeps giving me an error message which says: Fatal error: Call to undefined function: stripos() in /hermes/bosweb/web177/b1777/sl.cugopobvlad5/public_html/frames/processing.php on line 15. heres what i got on line 15 : $check = stripos($email, $at); can you tell me what im doing wrong. thanks Quote Link to comment Share on other sites More sharing options...
jlhaslip Posted March 6, 2009 Report Share Posted March 6, 2009 What is in the variable '$at'? Where did you define that value? The line of code looks fine to me, but it is difficult to debug a single line of code taken out of context like this. Quote Link to comment Share on other sites More sharing options...
cugopob.vlad Posted March 6, 2009 Author Report Share Posted March 6, 2009 <?php include ("contact.php"); $name = $_REQUEST['yourname']; $email = $_REQUEST['email']; $comments= $_REQUEST['feedback']; $email_message = "name: {$name} with the email of: {$email} . "; $at = "a"; //$check = stripos($email, $at); if ($name == "") { echo "Sorry but you need to put your name in."; } elseif ($email == "") { echo "Sorry but we need your name and email address to get back to you"; } elseif ($comments == "") { echo "Dont You Have Any Comments or Questions?"; } else { print " sorry but our form is down right now please check by later. thanks. "; } //elseif ($check){ //mail('cugopob.vlad@vladsandjosestimeline.com','Form Response ', $email_message . " " . $comments ); //print "We thank you for your comments and be sure to check out the rest of the site."; //} // else { //echo "Please put a real email address."; //} ?> Quote Link to comment Share on other sites More sharing options...
LSW Posted March 6, 2009 Report Share Posted March 6, 2009 What is stripos? What is it meant to do? Quote Link to comment Share on other sites More sharing options...
monkeysaurus Posted March 6, 2009 Report Share Posted March 6, 2009 (edited) stripos ? Returns the numeric position of the first occurrence of needle in the haystack string. Unlike strpos(), stripos() is case-insensitive. Edited March 6, 2009 by monkeysaurus Quote Link to comment Share on other sites More sharing options...
monkeysaurus Posted March 6, 2009 Report Share Posted March 6, 2009 Stripos was only introduced in PHP5 - are you still using PHP4? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.