Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. So you want to delete any records that have the same last name as another record. Of the two records, Mark Holmes and Aly Holmes, which one do you want to delete and why?
  2. You should always keep your content management systems up to date and keep listening for news about fixes and security updates for them.
  3. From the access log it looks like they've been sending post requests to wconfig.php. It also looks like they may be trying to take advantage of a possible vulnerability in /js/fancybox/helpers/template.php and /js/fancybox/helpers/ipn.php
  4. The first security problem I mentioned before which would allow them to use your server to send e-mails anywhere is where you're putting user data straight into the mail headers. No, it wouldn't. Nothing is attempting to execute that as PHP, it's just a string. //***************************Set $_Post Fields To Variables ******************************// foreach ($_POST as $key => $value) { $$key = $value; } This is another security threat. This allows anybody to overwrite any existing variables in your system. In the block of code you've displayed, though, I can't see any specific way it could be used to execute PHP or upload files to your server but if you have more code structures like that in other parts of your server that is a potential attack vector.
  5. I don't see anything in that particular block of code that would allow them to upload files to your server. What they could do with it is use your server to send unsolicited e-mails to anybody they like.
  6. In what way is it identical? Do you mean to find two rows that have all the columns the same or just some of the columns?
  7. Some parts of your website are not meant to be seen by search engines. You would use robots.txt to tell search engines not to crawl those pages.
  8. Ingolme

    Is this possible?

    You can use the file_exists() function, but just keep in mind it uses the server directory structure, so don't include the domain name, figure out the location of the file on the server relative to the current file. Don't use a table just to align things horizontally, use CSS. There are many CSS techniques for that. You can change display to "inline-block" or just use float to move elements to the left.
  9. Ingolme

    php

    Here's a blog explaining what problems PHP has: http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ It's a long read but I recommend reading the whole thing (and paying attention, not just skim over it)
  10. Press F12 to open the error console, then run the code. Here's the first problem: That should be XmlHttpRequest. Javascript is case-sensitive. You should also be declaring all your variables with the var keyword: var xhttp = new XmlHttpRequest();
  11. Ingolme

    php

    Google and Yahoo don't use PHP. As a server-side language it's good for individuals and small businesses, but not good for larger scale projects. It's not going to die, but it will never be the optimal server-side language. It's popular due to being free and really easy to learn.
  12. If you only want rows that exist in both tables then you would use an inner join.
  13. If you intend to sort the data, load multiple records at a time or search for data matching certain criteria you're much better off using a database than storing the data in a text file. If you expect to have thousands of records and your program is going to be reading the data frequently then you definitely are better off with a database. Databases are optimized for handling large amounts of data. If you stored it in a file which is loaded and manipulated with every visitor on your site then you're going to have problems with file locking, overloading the memory and limitations with file size.
  14. If you want a link instead of a button, just change the <button> element for an <a> element. <a onclick="document.getElementById('id01').style.display='block'">Open Modal</a>
  15. This looks like a Drupal menu. From the Drupal menus administration you can just remove the item. Other ways to hide it would be CSS or Javascript.
  16. Ingolme

    link color

    No, by default the background color of an element is transparent and that's preferable so that the background color of the element that contains the link will be behind it.
  17. Ingolme

    Css In Php

    No, it's not possible to put CSS inside PHP blocks. You can put it outside of them, though. You can write CSS in PHP the same way you write HTML code in PHP: <?php header('Content-Type: text/css'); $color = '#ED0000'; ?> .error { border: 1px solid <?php echo $color; ?> color: <?php echo $color; ?>; }
  18. What they actually want is to store the value in an input while also displaying it to the user. The fact that the name of the input and its value are the same is just a mistake in the example code.
  19. You can have a text type input and set it to readonly. <input type="text" name="Verb1" value="Verb1" readonly>
  20. The HTML is the same regardless of the language, the tag names are always in English, but the content of the page can be in any language you want.
  21. This is an assignment. You're setting all the elements in the array to "d" aRay[y]='d' Also, in Javascript there is no endif statement. Code within the if() block should be wrapped in { curly braces }
  22. Ingolme

    Php Framework

    If you're just learning, I would recommend not using any framework at all until you're very confident in your PHP knowledge.
  23. I'd start with removing the backlinks from your signature.
  24. You should check what values you're actually summing up SELECT date_received, amount FROM invoices WHERE date_paid = '0000-00-00' AND WEEK(DATE_ADD(date_recieved, INTERVAL 60 DAY)) = 52 AND YEAR(DATE_ADD(date_recieved, INTERVAL 60 DAY)) = 2015 From what I can see your query is correct, but I don't know your actual specifications.
  25. This isn't something MySQL can do, since grouping is based on a column independently of the other columns. What you would need to do is get the server-side language to look through the results and construct an array of new results.
×
×
  • Create New...