Jump to content

alexdemers

Members
  • Posts

    65
  • Joined

  • Last visited

    Never

Everything posted by alexdemers

  1. Use concatenation: $sql = "SELECT e_mails FROM mail_useage WHERE date=".(date("Y-m-d", TIME() - 18000));
  2. Hey, I have an object: typeArray = ['header', 'data', 'footer', 'all']; and I want to reference these in my array: mainArray = { header: [0, 12, 53, 44, 2], data: [0, 5, 36, 45, 83], footer: [2, 24, 54, 44, 89], all: [5, 84, 44, 23, 6] } I want to be able to use this: var type = 'all'; mainArray.type[3]; But it thiniks that type is part of mainArray. Is there any way to tell JavaScript that "type" (in my case) is actually a variable and not an object/array name? Thanks
  3. Right and then how would you apply OCR on something like: <img src="qmdhstqst3q3d5hq37g5hq45347tj3q56j4y78sqwrd74jy6+q84ky35s734eyk7s 78ylu4s88l4rs78ul869sr9ur9+§lu/7rs3lu874d73§lu6s346s4ku486sr"> Same way a browser does. Folder: qmdhstqst3q3d5hq37g5hq45347tj3q56j4y78sqwrd74jy6+q84ky35s734eyk7s 78ylu4s88l4rs78ul869sr9ur9+§lu File: 7rs3lu874d73§lu6s346s4ku486sr It is weird tho for a folder/file name. Even if it doesn't end with jpg or whetever the format it, if it has content-type headers it will show up properly in the browser.
  4. Well, you built the logic that mostly everybody would figure out in 30 seconds. Obviously it's step 4 that is the hardest part. I don't know any image recognition library in PHP (I would be surprised if there were any. As for step 2 and 3, they should be replace with viewing the source code instead: $page = file_get_contents('http://urlofform.com/form.php'); ... and do some regex to get the image file path and then run the image recognition software of that single image. I cannot help you further because I never had an interest in breaking/spamming/hacking web sites.
  5. obviously "cart|" should not be part of the unserialization. This was probably for reference so: $serial = substr($_COOKIE['name_of_cookie'], 5); $array = unserialize($serial);
  6. $_POST('fld1') should be in brackets: $_POST['fld1']
  7. Nothing wrong with that code. What's in your header.php file?
  8. Try moving your include outside of myFunction()
  9. Would it be better to pass the string? No, this is a VERY good sign that you need to use OOP (Object Oriented Programming) or classes for your development process. Edit: typo
  10. No we can't. We can't provide you with a complete script even if it's "urgent". But, we can help you to guide you in the correct path. PHP: file_get_contents - Manual + PHP: preg_match_all - Manual
  11. For every letter find it's upside down ASCII value. On Windows, click Start (or the windows logo) then Run. In the run dialog, type "charmap" press enter. Now, let's say the user types "A", now look at the character map table and look for an upside down "A". Then, break down the user's string into an array and to str_replace of each of the letters.... and go on from there.
  12. Do you have an element with the ID "navigation" surrounding your <ul> ?
  13. The closes thing you can do is insert thousands of blank lines before starting to output your page. (stupid) visitors might say that the source is not available. Of course this method won't work with addons like Firebug. Or just play with whitespace of your HTML source. Your PHP code is already hidden. If it's for JavaScript, minimize your code.
  14. I know you already know this but the PHP docs is a damn good place to look tutorials. Most of the functions have a couple of examples, if not the user comments are always helpful. PHP: COM - Manual
  15. ... or replace $_POST['hq'] with $_POST['radio']
  16. Replace id="hq" with name="hq" on your input element. Only name+value combination gets sent to the server. Nothing else.
  17. MySQL :: MySQL 5.1 Reference Manual :: 3.3.4.8 Counting Rows SELECT COUNT(*) FROM `table`
  18. To add to my previous response, you need to do num_rows method and not field_count method.
  19. You need to store results so you can count them PHP: mysqli::store_result. Edit: actually look at this if you are using prepared statements: PHP: mysqli_stmt::num_rows - Manual Read the Typer85 at gmail dot com's comment at the bottom of the page.
  20. COUNT(*) or COUNT(field_name) Not just COUNT by itself.
  21. Do what smerny said. If that doesn't work, try adding $tablerows = ''; before concatenating $tablerows. I may be wrong but maybe there's an error trying to concatenate with null (shouldn't be a problem). Also, is this condition if ($_SESSION['user_logged_in'] == true) { being entered?
  22. Well, as said in the sticky, headers should be set before any echo statements. If there's 1 byte of content, the headers will not work. You have two choices here. Either set the header before echoing the content, or do your insertion in the database before starting to output the table. So move your block of code to check/insert the comment in the database and move it before the loop to parse the table. Make any correction if it fails.
  23. Check line 60. You are already in PHP so no need to <? $_SERVER['PHP_SELF']; ?>. Replace that with action=\"".$_SERVER['PHP_SELF']."\" and everywhere where you used <? ?> Edit: Also, you shold really be cleaning your code/syntax. There's alot of confusion in there and that's where it creates problem.
  24. Well, bingo cards are usually sorted so I guess it should be sorted in the array. Comparing one whole bingo card to another will work but only return true or false if they are the same, they won't return the differences between the two.
  25. I'm guessing that you do the cookie change after the parsing of the page. Try putting the if(isset($_POST['show'])) block before you echo out all of the items/articles/results.
×
×
  • 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.