Jump to content

ManiacDan

Staff Alumni
  • Posts

    2,604
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by ManiacDan

  1. Something, somewhere on your page, looks something like this: <script language="JavaScript"> //something here. linkWord(obj); </script> The "//something here" will be a number of lines that built the object USED by this function. All I can see is a function that uses an external list of items.
  2. Note that this won't work. Proper syntax: <?=$var?> <?php echo $var; ?> Note the semicolon. Also, BlueSkyIS is spot-on about deprecation. It means "still works but don't write NEW code with it," not "doesn't work." -Dan
  3. Whatever CALLS this function passes it an object, that's what you need to edit. -Dan
  4. if you only use <?php, there should be nothing to fix, right? -Dan
  5. Remove the "or die" from your function return, that's wrong. When you do that, you end up returning a boolean, which is not an object. -Dan
  6. That still applies. if you have the ability to change the file that actually displays the form, you can change these hidden inputs into javascript calls that inject the inputs into the form.
  7. That's still not exactly clear. Do you have the ability to change the PHP that creates the HTML form or not? If you can change the PHP, you can insert some of these form fields using obfuscated javascript, as mentioned. Depends on the definition of "casual." Hidden form fields are concealed from 90% of the population. Hidden form fields injected in JavaScript are hidden from 95% of the population. -Dan
  8. What do you mean "using only PHP?" Form fields are HTML. Whatever prints the HTML is what needs to change.
  9. Check your cookie settings in internet explorer.
  10. Sessions are based on cookies. Check your cookie settings.
  11. If $all_products[$thisproduct] contains the product ID, just pass that. If $all_products[$thisproduct] does not contain the product ID, pass the product ID along with $all_products[$thisproduct]. Do not pass the whole array every time if all you're going to be doing is sucking out a single product. -Dan
  12. Yeah...you want: if ( strpos( $_SERVER['HTTP_USER_AGENT'], $Match ) !== false ) -Dan
  13. Without seeing the contents of $Match, all we can tell you is that you're calling the ereg function properly, but you shouldn't be using it in the first place. -Dan
  14. More specifically, $all_products doesn't exist inside that function. You must pass ANYTHING you wish to use in a function into that function from the outside. -Dan
  15. PHP code can't simply be copied and pasted from one document to another and retain its values. I bet it's not working when you think it is. echo "COOKIE SET TO: {$_SESSION['username']}"; I bet it's not there.
  16. Wait...you want to return sets that have TWO instances of "chicken"? Absolutely you must break this into its own table. You should really break it into another table, with "name" and "count," so that you can store "chicken":"2" -Dan
  17. Generally people hate when you do this, because that means THEIR software stops working when YOUR site goes down. Think about your liability there. If your server goes down, EVERY CLIENT you've ever had goes down. Bad mojo. Obfuscate it and wrap it in a legal contract. Then get a lawyer if someone steals it. Learn from the DRM fiasco with video games and music. If I wanted to steal your code, I would. You couldn't do a damn thing about it. All you'll be hurting is your paying customers. -Dan
  18. WHERE find_in_set('chicken', items) AND find_in_set('penguin', items) That doesn't work? Also, you're doing this wrong. Research normal forms as they relate to database design. You should split this field into its own table. -Dan
  19. 1) Are you sure that variable you're setting exists? If it's FALSE or 0, it won't go through. 2) $_COOKIE is only populated on subsequent loads of the page. Set the cookie, visit a new page, cookies are there. 3) Are you seeing the cookies in your browser? Install the "view cookies" plugin for firefox, then view the cookies in the page information dialog (CTRL+I [i for Information]) -Dan
  20. To be clear, your quotes are misplaced. That line should be: $stmt->bind_param( 'sss', $_POST['name'], $_POST['email'], $_POST['comments'] ); -Dan
  21. Fixed.
  22. Yeah, procedural code with global DB objects generally rely on globals because it's not considered "lazy" there for some reason. I still dislike it, but I haven't written procedural code in years, so whatever floats your boat. Either way, OP needs to read that link. -Dan
  23. You cannot make plain text bold, that's not how it works. When you change your text to bold in gmail, gmail is sending HTML without you realizing. -Dan
  24. Generally using globals is bad form, if you need something inside a function, pass it into that function. Also: Variable Scope -Dan
  25. That error is related to your database structure, it has nothing to do with your HTML or PHP. Basically, the database is saying "you have a table set up as a foreign key, which means every value in tableA corresponds to a value in tableB. You are trying to update tableA to have a value that does not appear in tableB." -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.