Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. I have not studied .htacces yet, so I won't pretend to know about this...however I found a tutorial on the subject http://www.easymodrewrite.com/example-extensions
  2. the submit should refresh the page for you...
  3. perhaps this is what you are referring to? http://dev.mysql.com/doc/refman/5.5/en/fulltext-boolean.html
  4. nooo, it would be either <?php echo $_SERVER ['SCRIPT_NAME']; ?> or action="file.php" http://php.net/manual/en/reserved.variables.server.php
  5. $id will return true if it contains an empty string
  6. I normally use either "#", $_SERVER['SCRIPT_FILENAME'], or $_SERVER['SCRIPT_NAME'] if I don't use the file name itself that is.. "file.php" note that using $_SERVER indices will require your server to have them configured
  7. perhaps use preg_match then \ $subject = 1234343-words are here; $pattern = '~[0-9-]*(.+)~'; preg_match($pattern, $subject, $matches); foreach($matches as $match){ print "$match <br />"; }
  8. in regex the pipe symbol " | " is use as an OR statement
  9. if there are no other digits in the string except the ones that you would like to omit...you can use str_replace $subject = "1-words are here"; $search = array(0,1,2,3,4,5,6,7,8,9); str_replace($search, '', $subject);
  10. now im confused, so "OR" isn't actually in your string like you have shown above?
  11. and you are sure that PHP is configured correctly with your server? what does the phpinfo() page tell you
  12. if they are all separated by an OR... why don't you use explode? $array = explode("OR", $string);
  13. ah yes, thanks thorpe for that
  14. test.html would be test.php remember that when using a php extension, you are able to incorporate HTML, PHP, javascript etc... with an .html or .htm extension, PHP is not valid...
  15. have you tried printing your query to make sure it is doing what you expect, also when using mysql_fetch_row(), make sure you are grabbing the correct row.. what should your output be?
  16. yeah I was actually talking to xyph a little bit ago about the one that he uses..I will need to look into getting one, will save me some time and produce cleaner regex no doubt...
  17. how can your date field equal all those things at once? I think you are confused in how this is done.. also, are you using mysql_error to debug this query?
  18. \ahhh you're right, my fault I like your regex better anyways...
  19. true xyph, a simple xml format change could make things alot easier for you OP
  20. yes you're absolutely correct, i missed that in my scan of the code
  21. is this argument really still going on? there needs to be a combination of theory and reality in all aspects of life..nuff said
  22. always is
  23. this can be done with a regex yes. $subject = "+1.5-165"; //or other way around $pattern = "~^(\+[0-9]+\.[0-9]+ |-[0-9]+\.[0-9]+)(\+\d+ |-[0-9]+)$~"; preg_match($pattern, $subject, $matches); foreach($matches as $match){ print "$match <br />"; } Edit: well I took the time to write it, so i might as well post it! Sorry Gizmo for the redundancy
  24. ^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\. ([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])$ $subject = "56.49.987.5687.564.34.55"; //the haystack $pattern = "~^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\. ([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])$~"; //needle preg_match($pattern, $subject, $matches); foreach($matches as $match){ print "$match <br />"; }
  25. are you certain that the if condition is being met? I would imagin that you would want to check if the submit button has been clicked first if (isset($_POST['fullname'])) { if(!empty($_POST['first']) && !empty($_POST['middle3] && !empty($_POST['last']))){ //act accordingly } }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.