Jump to content

ManiacDan

Staff Alumni
  • Posts

    2,604
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by ManiacDan

  1. I've clicked ads on TheDailyWTF, Penny-Arcade, and even Facebook in the last couple weeks. Relevant ads are more likely to be interesting to the person reading them. I would never click a dog food ad on a technical site out of principle (and I spend $200/mo on dog food). Relevant ads are harder to tune out, that's why they work better. A flashing banner demanding that single moms take advantage of obama's new insurance rules won't get clicked. An ad for Zend might. Plus, the relevant ads that are low key are less likely to be adblocked. I installed adblock to combat the advertising on devshed when I was a moderator there generating dozens of posts a day. That's because the ads there were interfering with how I was using the site. UX is important, but I think relevance is just as important.
  2. I was with you until the last paragraph. What are the alternatives? What about projectWonderful?
  3. +1. The first batch prevented me from copying and pasting, and obscured some of the content. The second batch obscured ALL of the content.
  4. You're getting a duplicate key error because you have a key on the table that's blocking the insert. The original insert is failing, and we can't tell why, because you STILL haven't printed out the query, run the query by hand, or shown us the table definition. echo the query (the QUERY) and print it here. Copy and paste the query into a query browser (PHPMyAdmin, Navicat, whatever you used to make the tables). See what it says, if anything. Delete all rows from the table and try again. Do a "SHOW CREATE TABLE branch" (or...users, you have two conflicting tablenames in your post). Show us the output. -Dan
  5. This is why you NEVER use globals. Your dbconnect function should be entirely self-contained, or use global CONSTANTS (not variables) to perform its actions. -Dan
  6. Yeah, re-reading your original post shows that your code doesn't match your description of the problem.
  7. Make a primary key for the email and use INSERT INTO `table` (name, email) VALUES ('$name', '$email') ON DUPLICATE KEY UPDATE name = $name; Obviously that needs to be secured and cleaned up, but it will allow you to run one query instead of two. I agree with the BLOB comment, normally I would just encode it to be varchar compatible, but blob is technically faster and more correct. -Dan
  8. People love to complain, it's how they define reality, just as The Matrix. Seriously though, the sure-fire way to get someone to complain about an ad is to have the ad prevent them from viewing the content. Interstitials, takeovers, and hover-ads all obscure the content, and you get the most complaints. There aren't very many entirely ad-supported sites left. Penny-Arcade is the best example (though they now have a store). Their ad policy is simple: They run non-ugly ads for products that they themselves would recommend to friends. I don't know how well that would work here, but the ad slots would definitely be more valuable if it was "recommended by our team" rather than "check out some completely random blinking thing." Sidebar ads and ads between the posts seem to be your best bet, and you shouldn't get complaints as long as they don't flash, play noise, or advertise for something scammy. You can also try some kind of "subscription" model, but forums seem ill-suited for that. The repeat visitors are all adding value to your site, while the one-time visitors are the ones who get something of value from it. It's backward of the normal subscription model. -Dan
  9. There's no exact opposite of bin2hex, use base64_encode and base64_decode instead. -Dan
  10. Adding to what Jake said: Like Jake said: Print the QUERY, not the variables. The query should appear well-formed. Like Jake said again: Run the query in the database manager directly, see if it produces any errors or warnings. What value is inside the branch1 field when you're done? Empty string? Null? Zero? Drop-downs have nothing to do with database tables. It's possible you have the database column set up as a NUMBER, but you're trying to insert a STRING, and all you're getting is a zero.
  11. You've answered 1 of the 4 questions.
  12. Have you tried printing the SQL and looking at it? Have you tried running it by hand? What's the output of the mysql_error() function after this query fails? Are you sure the database table is set up properly? -Dan
  13. You're storing $encrypted_string (binary data) as a string. Run bin2hex on it before you put it into the database, and then run the reverse when you pull it out. -Dan
  14. Those full-page takeover ads are exactly what got me to start searching for an alternative to devShed. The business model and the customer base is all wrong for something like this. This isn't IGN or Salon, people come here to participate, not to consume. Even those that do come here to consume might get to 12 threads before they find what they're looking for. 12 takeover ads is 11 too many for someone like that. -Dan
  15. Use the UUID feature of the database or the operating system. -Dan
  16. ctype_digit is more accurate, Pikachu is right.
  17. The number in the curly braces is the number of times you want the item to match. You're looking for ZERO matches. Everything has zero occurrences of a digit. That being said, don't use preg_match for this at all: if ( intval($years) == $years ) { //whole number } -Dan
  18. Also, you're asking the wrong question, which doesn't help. There's no answer to "what variables do I use?" You use whatever you need to make a working program. That being said, this is way out of your league, against the FullTilt terms of service, and is illegal in some states and countries. Locking this thread before it gets worse. -Dan
  19. Going back a bit: That doesn't mean someone can't get access to it. Are you absolutely certain nobody else can break into this page? Your site security should be complete, through every layer of the site, not just at the edges or the easiest entry points. Glad you got the rest of it sorted. -Dan
  20. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=316889.0
  21. Don't ever do this like this. Don't let your users directly determine your database inserts. What if someone altered these POST values so that they were granting themselves permissions on your database? What if they made 'tabledrop' into "mysql.users (username, password) VALUES ('haha', 'hackedYou');#" Always ALWAYS sanitize user input. For this operation, that means ensuring that the table name is part of the valid list of table names, and running EVERYTHING through mysql_real_escape_string. Also, your answer is that [] is not the right way to surround variables inside strings, you want {} -Dan
  22. You had those errors turned OFF in 5.2, and your upgrade reverted them back to the defaults. This is why the isset() function exists. Also, you typed this by hand, but you're using the wrong number of equals signs in your IF check, and unnecessary parens in your $_GET access. -Dan
  23. Well...good luck. Step 1: Learn a programming language. Full tilt does not allow poker bots, google for "full tilt bot lawsuit."
  24. That's what the search results said, give it a try. -Dan
  25. Did you google for "innovaeditor IE issue"? -Dan
×
×
  • 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.