bobleny Posted April 13, 2006 Share Posted April 13, 2006 if (strpos($_POST['email'],"@") && strpos($_POST['email'],".") && strpos($_POST['email'] != " ") && $_POST['name'] != "" && $_POST['link1'] != "" || $_POST['link2'] != "" || $_POST['link3'] != "" || $_POST['link4'] != "" || $_POST['link5'] != "")Yeah see that? somethings wrong with it! I think it has something to do with the perenthasies but i cant figure it out. I'm not to good with php. If any one can help please do!Thanks Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 13, 2006 Share Posted April 13, 2006 What are you trying to do?This segment: [code]<?php strpos($_POST['email'] != " ") ?>[/code] is missing some parameters.Ken Quote Link to comment Share on other sites More sharing options...
bobleny Posted April 13, 2006 Author Share Posted April 13, 2006 Well i figuered it was that one because when you take it out it works. This is a if statement thats saying if all feileds check out the display send button. Evrey thing else works fine. I just tryed to add that so if the email feild has a space, it wont display the send button.So? <?php strpos($_POST['email'] != " ") ?>is missing some parameters.what is it missing? it looks good to me... Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 13, 2006 Share Posted April 13, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]So? <?php strpos($_POST['email'] != " ") ?>is missing some parameters.what is it missing? it looks good to me...[/quote]Did you look in the [a href=\"http://www.php.net/strpos\" target=\"_blank\"]manual[/a] to determine how to use the strpos() function?Here is the desciptions:[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]int strpos ( string haystack, mixed needle [, int offset] )Returns the numeric position of the first occurrence of needle in the haystack string.[/quote]You will notice that it needs at least two parameters. You gave it one, plus you have the closing parenthesis in the wrong place. You coded all the other calls to the function correctly,Ken Quote Link to comment Share on other sites More sharing options...
bobleny Posted April 13, 2006 Author Share Posted April 13, 2006 Yeah, I, I.. I don't get the whole needle in the hey stack thing... naope 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.