Jump to content

premiso

Members
  • Posts

    6,951
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by premiso

  1. It needs to be done server side. You will either need to disable it in the php.ini file, or run stripslashes on $_POST in the code. Since magic_quotes is a runtime variable, I don't think you can change it with ini_set, so stripslashes or php.ini are your only real options.
  2. Sounds like your server has magic_quotes enabled. This runs addslashes to any item coming from POST/GET, it is depreciated and suggested you turn it off in the php.ini or by using ini_set and that should solve that problem.
  3. Your syntax is invalid... $sql ="SELECT effdate, carrier, COUNT(carrier), SUM(employees), COUNT(employees),COUNT(migrate) FROM info WHERE effdate BETWEEN '$date_search_1' AND '$date_search_1' AND migrate = 'Yes' GROUP BY carrier ";
  4. It is a valid email, either or, according to the RFC standards. The real goal is, to send a validation email and make them click a "link" to activate their account. This weeds out random email addresses that are bad.
  5. SELECT count(*) as yes_count FROM table_name WHERE column_yes_no = 'Yes' Should do it.
  6. When the site comes back online: http://plugins.jquery.com/project/wrapSelection
  7. RewriteRule ^.*-cakes/(.*)\.html /cakes.php?target=$1 [L] Try that first, see how it goes. If that does not work, and you still insist on keeping multiple rewrites: RewriteRule chocolate-cups-towers/(.*)\.html /cakes.php?target=$1 [L] And the .* should work, in both spots. It is valid, so yea, if that is messing up then something else is messing up. You may also check your APACHE logs (access and error) as they may contain a clue. But the [L] is key, do not take that out either way.
  8. I can understand that, but you really do not need to use multiple ones. If security is your deal, set an allowed array in the cakes.php file or similar and 404 anything that is not in that list. But having multiple re-writes causes problems. Try removing them all, and replacing them with the one I posted and see how it runs. If nothing else, add the [L] after all of them, so the processing stops when it hits a matching rule.
  9. Did you remove all of the redirects except the one I posted (with your modification of course)? Also, sometimes browsers, like Chrome, like to cache certain items. I would suggest using Firefox to test (if you were using Chrome) to prevent a false positive.
  10. Well glad you got it working, and yea, you can try using (.*), but if you do that you would need to change target=$1 to target=$2 but if the [a-z0-9]* will capture everything you may have there, that will work just fine.
  11. That seems a mess, you can do it with 1 rewrite statement: RewriteRule ^.*-cakes/(.*)\.html /cakes.php?target=$1 [L] Try that out and see how it works for ya. As to why only 1 was working, well the [L] says "Stop at this rule if it is true". Leaving it out, the rewrites check everything else, and that would more than likely by why it was flaking out.
  12. For that you will most likely want to use the base tag, so inside the <head> tag of your html (hopefully it is templated and you have 1 header file or so to change) add the following before the </head> <base href="http://www.somesite.com/admin/" /> </head> And that should resolve that problem.
  13. In your main included file (usually config.php) modify the DOCUMENT_ROOT for that folder, it's not like you cannot append to it... $_SERVER['DOCUMENT_ROOT'] .= '/admin/'; Should do it, and as long as that config file is only used in that admin subdirectory, it should not affect the rest of the scripts.
  14. The dead should stay dead. Stop resurrecting Zombies!!!! Create your own damn thread.
  15. The operator ManiacDan used ( % ) is called the modulus operator, incase you want to read up on it to understand what it does
  16. s/die/thrive/ Had to correct you on that
  17. Whoa whoa whoa, hold on a second...a car does not fertilize the road like my amazing horse does, that is not the same thing at all....but wait a second!!! I got it, a Car does fertilize the road, because it can have an oil leak, so really my horse only fertilizes the dirt roads. Interesting!
  18. *premiso plays the world's smallest violin just for you ZOMG people being rude on the internet, completely unheard of... *premiso rollseyes
  19. 69 votes to 40 votes.... how is that misleading? Oh and moved my vote to Other for Geany.
  20. When you created the user 'talos342c' did you grant him privileges to a database? Here is a decent article about what you need to do when you create a new user: http://www.databasef1.com/tutorial/mysql-create-user.html
  21. I would suggest reading: http://php.net/manual/en/language.oop5.php To learn where you are going wrong with that. Aside from that, here is probably what you are doing: <?php class common { require ('db.inc.php'); $db = new db(); function _cookiecheck() { Here is one way to do it: <?php require ('db.inc.php'); class common { function _cookiecheck() { $db = new db(); Which will work.
  22. Use need to define $db inside the class / function scope. The class / function does not know what $db is, as it is out of scope. Check out http://php.net/manual/en/language.variables.scope.php for more information.
  23. I would just create a range using the highest and then use that in an IN() statement in mysql, something like: $range = range(100, $highest); $query2 = mysql_query('SELECT * FROM video WHERE cable_number IN(' . implode(',', $range) . ')'); while ($row = mysql_fetch_assoc($query2)) { echo $row['cable_number'] . ' was in the range! Hooray!<br />'; } Which should be a bit more efficient then the other route. Not sure if this is what you were looking for, however.
  24. *premiso shrugs Don't really see how that is relevant here but good information (I guess). But either or, the braces or no braces it will echo out fine, more of a personal preference.
  25. Set the auto_increment field. Mainly because firstname and lastname are not always unique. Look at how many John Smith's there are in the world!
×
×
  • 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.