dj are you any good at MySQL? Have a question...
dj are you any good at MySQL? Have a question...
I know a little bit, but just enough to get by myself, really... wouldn't claim to be particularly "good".
As for adding that... the .txt seems to be missing, and I think I'd need to look at the whole thing.
All you really need to do is find an if that gives an error, if the email is invalid, then add in "|| $email<4" where the || means or.
Show me the .txt and I can find the right spot.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
ok .txt file is all updated![]()
Ah, my error there. I was trying to make it not give errors if it was under 4 characters when it looked for the @ and such, but this will fix both:
Change this:To:Code:if (strlen($email)>4) { $filename = "emails.txt"; $at = strpos($email, "@"); $dot = strpos($email, ".", $at+2); $atnum = substr_count($email, "@");Code:if (strlen($email)>0) { $filename = "emails.txt"; if (strlen($email)>4) { $at = strpos($email, "@"); $dot = strpos($email, ".", $at+2); $atnum = substr_count($email, "@"); }
Oh, also, add to this line:
Code:if (strlen($email)<5 or $at == false or $dot == false or $dot == strlen($email) or $atnum > 1)
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Beautiful! Thanks dj excellent again! Now all I need is just to stop the alert from popping up, but whenever you get time, I know your busy! Thanks again!Originally Posted by djr33
actually could you check the .txt file? i only noticed the last line after i updated it... did i add it all in the write spot?
No.ADD the part in bold above to the EXISTING if statement.Code:if (strlen($email)<5 or $at == false or $dot == false or $dot == strlen($email) or $atnum > 1) if ($at == false or $dot == false or $dot == strlen($email) or $atnum > 1)
So... just replace those two lines above with:
Instead of adding the part in bold, you just added the whole thing again.... shouldn't hurt too much, but you would need an extra close bracket at the end, and it's really not doing you any good to check the same thing twiceCode:if (strlen($email)<5 or $at == false or $dot == false or $dot == strlen($email) or $atnum > 1)![]()
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
ha ok all done! (i think)
Ok... here's your body tag, right?Replace that with:Code:<BODY<?php if ($message == "") { ?> onLoad="alert('Curious? You should be. Sydney’s rebel Ronins of streetwear are dropping their Kimono’s and picking up gear sharper than any katana from the label that killed the cats you used to love.\r\rLike an army of modern day Mifune, the Samurai of the street blend into their surroundings, snuffing the less than worthy with killer prints and cuts this season.\r\rSleek, clean killers the Curious clothing range Ronin and Geisha are decked out in tees and singlets that reflect the nature of our fine city – crucifixes in a sombre, demure black print or laughing in the pews with glitzy, ironic silver or gold foil. The hurricane-fence print reminds you of which side of the tracks you hail from… Skulls bump heads with the clouds in a range that comes from the street, but stretches to the sky. Fashion victims? Maybe….\r\rstockists?? + 61 415 397 606');"<?php }?> >Code:<BODY<?php if ($noalert != 1) { ?> onLoad="alert('Curious? You should be. Sydney’s rebel Ronins of streetwear are dropping their Kimono’s and picking up gear sharper than any katana from the label that killed the cats you used to love.\r\rLike an army of modern day Mifune, the Samurai of the street blend into their surroundings, snuffing the less than worthy with killer prints and cuts this season.\r\rSleek, clean killers the Curious clothing range Ronin and Geisha are decked out in tees and singlets that reflect the nature of our fine city – crucifixes in a sombre, demure black print or laughing in the pews with glitzy, ironic silver or gold foil. The hurricane-fence print reminds you of which side of the tracks you hail from… Skulls bump heads with the clouds in a range that comes from the street, but stretches to the sky. Fashion victims? Maybe….\r\rstockists?? + 61 415 397 606');"<?php }?> >
And, add this right below the end of the upper php tag:Code:if ($message != "") $noalert=1;
Finally, right below this:Add:Code:if (strlen($email)>0) {Code:$noalert=1;
That should fix the alert problem.
Note that all you need to do is put "$noalert=1;" wherever (like in an if statement) if you don't want the alert to pop up. What I did should work, though.
Try it out...![]()
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
hey dj awsome! where does this go sorry?if ($message != "") $noalert=1;
Bookmarks