-
Posts
4,362 -
Joined
-
Last visited
-
Days Won
11
Everything posted by Zane
-
Unlike ereg POSIX regex functions, the preg PCRE regex functions require the delimiters at the beginning and end, just like you have in your jQuery regex. So your preg_match, should look like this return preg_match("/^(?!(??:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){255,})(?!(??:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){65,}@)(??:[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\x3D\x3F\x5E-\x7E]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]|(?:\x5C[\x00-\x7F]))*\x22))(?:\.(??:[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\x3D\x3F\x5E-\x7E]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]|(?:\x5C[\x00-\x7F]))*\x22)))*@(??:(?!.*[^.]{64,})(??:(?:xn--)?[a-z0-9]+(?:-[a-z0-9]+)*\.){1,126}){1,}(??:[a-z][a-z0-9]*)|(??:xn--)[a-z0-9]+))(?:-[a-z0-9]+)*)|(?:\[(??:IPv6:(??:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(??!(?:.*[a-f0-9][:\]]){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?:?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(??:IPv6:(??:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}|(??!(?:.*[a-f0-9]{5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?:?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}?)))?(??:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\.(??:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))\]))$/", $email); Maybe you tried that already, but I'm just sayin'.. you need those forward slashes for PCRE regex.
-
you mean like SELECT status, start_time, message_id FROM yourTable ORDER BY start_time DESC GROUP BY status
-
They DO NOT need to be in the same order as they were inputted from the form. They fields simply need to exist. An easy way to grab all your inputs and update is through the use of a foreach loop Provide some code if you need quality help. Otherwise, you'll just get a random snippet of what it may look like.
-
I'm not going to tell you to give up on making your CAPTCHA system, but I will suggest that you make use of a system that's already stable... and FREE http://www.google.com/recaptcha If you're looking for a not-so-difficult version, then check these out http://woork.blogspot.com/2009/02/10-free-captcha-scripts-and-services.html To put it short, there's no point re-inventing the wheel unless that wheel is revolutionary.
-
You only need to list the fields you want to change/UPDATE The WHERE clause takes care of which row it is..
-
And what examples might those be? What have you tried thus far, specifically? Provide code if you have to.. Actually, I highly suggest you do.
-
Eventhough putting all of that information on one line will work, it is a good practice, in the beginning/intermediate stages of programming, to break it all apart into variables. This will make it much easier for you to debug. It doesn't hurt to space out your concatenations either...well, it may increase filesize, but I have a feeling your script isn't that big to begin with. $filename = $_FILES['image']['tmp_name'][$i]; $dest = WEB_UPLOAD . "/images/galleries/g" . $gid . "/" . $_FILES['image']['name'][$i]; move_uploaded_file($file, $dest) or die("Error uploading image "); Now it shouldn't be too difficult to figure out where to use str_replace.
-
it doesn't work? How so? Those methods are exactly how you get rid of those spaces. Show us your code
-
Such sites use the provided APIs for those companies to get that information Yahoo for example http://developer.yahoo.com/addressbook/
-
Show us your current code
-
http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#operator_not-equal
-
This topic has been escorted to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=354341.0
-
I started out with Julie Meloni's first book. PHP Fast and Easy Web Development, written in 2000. I learned a great deal from the book at the time, and she has since published more books with SAM'S http://www.thickbook.com/ I wouldn't doubt that her newest PHP book would be very helpful. http://www.thickbook.com/books-2/sams-teach-yourself-php-mysql-and-apache-all-in-one/
-
Guiness Extra Stout or Yuengling Black and Tan
-
Great promotion.. congrats Phillip.
-
Who's your favorite artist, musician, band, etc?
Zane replied to livethedead's topic in Miscellaneous
Haven't even heard of The Dead Weather, I will definitely have to check that out. Jack White's stuff is "off da hook" -
Who's your favorite artist, musician, band, etc?
Zane replied to livethedead's topic in Miscellaneous
The Black Keys, White Stripes, Raconteurs, and The Strokes -
Talk to fenway, this could easily be alleviated with a few JOINs... at least I believe
-
This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=353752.0
-
You'll need yet another table, using the link ID as the key. So you'll have ID, LINKID, UID, viewCount just addon to viewCount when they click the link... and deauthorize if it's greater than 3
-
This is two multi-dimensional arrays.. but yeah, assuming you had one, you'd use a foreach $array = //multidimensional array $count = 0; foreach($array as $value) { if( is_array($value) { $count += $value[1]; } }
-
Congrats Kicken, welcome aboard the ship that is PHPFreaks..