Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by Ingolme

  1. Date time not working...

    The DateTime objects can't be compared with the usual comparison operators because they're not primitive data types. Compare their timestamps instead: $dtA->getTimestamp() > $dtB->getTimestamp()
  2. How can I vertically align to top?

    Vertical-align only applies to inline elements, inline-blocks and table cells. If you want the "1" further up, try reducing the line-height.
  3. The easiest solution would be to set the textarea to readonly by giving it a readonly attribute. You can style it to not look like a text area by giving it a transparent background and no border. If you actually want to copy text from an element that's not a textarea I would actually have to do some tests to see what the browsers do and don't allow.
  4. Template examples / h3 classes not centered on iPad

    I can't tell for sure why that's happening just from the screenshot, I would need to actually see the image and code, or the page itself, in order to be sure. If that is a background image which is not extending to the full width of the element then it means the image is not large enough, you can set the background-size to "100% auto" (100% wide and height adjusts based on the image's aspect ratio) or center the image if you prefer. If the background image is large enough and is actually reaching the full size of the container then that means something is getting outside of the container and you would need to find out why.
  5. Web Standard X11 (Primary Digital Named Colors)

    I am not entirely sure what exactly you're trying to argue for. You bring up the fact that we have billions of colors but still seem to want to use names to select them. No matter how many human-readable names you give to these colors the set of named colors will only ever be a minuscule subset of all the colors that are available. The only way to have full color freedom is by referring to them through numbers. Named colors, while good for communication between humans, are not good at all for actually identifying colors. When you tell somebody "blue" it does not say anything about exactly which shade of blue you're referring to. If somebody asks you to make their website blue, which color are you going to use? Blue Blue Blue Blue Blue When people are selecting a color for paint or a light bulb, somebody has to provide them with a sheet showing all the available colors and allowing them to pick one, or in online businesses you present them with a color picker. The color they end up selecting will most likely not have a specific name but rather an identifier and on the web, that identifier is almost always a color code in RGB format. I'll repeat that X11 is not a web standard, it is merely mentioned in a W3C document ( https://www.w3.org/TR/2002/WD-css3-color-20020418/#x11-color ). The document shows a list of X11 color names that are supported by popular browsers at the time of writing, but the specification neither requires the browsers to support them nor guarantees that this support will continue in the future. Again, it's not really clear exactly what you're asking for, could you summarize your idea in one sentence?
  6. Web Standard X11 (Primary Digital Named Colors)

    X11 is not a web standard, it's a digital color standard from the 20th century. Honestly, any named color system is going to have its limitations, on the web I highly recommend ignoring named colors at all and using value-based systems, namely RGB and HSL. RGB is the closest to how computers process colors, but HSL allows for easier transitions between brightness or hue. In general browsers have 8 bits per channel and three channels: red, green and blue. This gives us 256 possble values for each color and 256^3 = 16,777,216 total colors. Computers are capable of showing more colors than that, usually using 32 bits to represent the color. There's no point in naming all of the colors, and the industry classification of colors is a subject that's pretty far removed from web development.
  7. Prepared statements: having trouble with PDO and Mariadb

    What is [test-survey1]? If the table name is" test-survey", then you should have it between backticks `test-survey`, though I've never seen a table name with a hyphen in it before, I'm not sure it would be valid.
  8. The WebAIM does not state anywhere that skipping heading levels is incorrect.
  9. Prepared statements: having trouble with PDO and Mariadb

    The name of the parameters you bind should match the name of the placeholders, not the name of the fields. Your parameter names should be ":Q1", ":Q2" and ":Q3", not ":FavMonster", ":FavVillian" and ":FavMovie"
  10. SELECT JOIN - A Failed Query

    It looks like you're missing the FROM keyword here: SELECT * parent_table
  11. Trying to round the courners of my submit button

    The problem is that you give the inputs an "af-textWrap" class which sets its width to 70% and shifts it to the right.
  12. SELECT JOIN - A Failed Query

    What is the exact query you used?
  13. SELECT JOIN - A Failed Query

    Clearly "table" and "ref_table" are placeholders for table names in your actual database.
  14. Need advise with Imagick

    Most likely a syntax error is causing nothing to be displayed. Both of your print statements have an error. The first did not capitalize "Imagick", the second one has "->::"
  15. Semantic UI

    Is that some kind of framework or are you referring to the action of using semantic mark-up to make user interfaces?
  16. SELECT JOIN - A Failed Query

    VARCHAR almost always takes less space than CHAR, because it allows fewer characters than the limit while CHAR requires the full space to be occupied. If you put a smaller string in a CHAR field, it pads the rest with null bytes. If you put the string "Hello" in a CHAR(150) field, what you essentially have in the table is "Hello\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
  17. side nav with menu icon?

    Yes, but you have to understand how each of the two things are made.
  18. Snackbar??

    If you learn a bit more Javascript, you can do any of that. You'll need to learn about event listeners and timing. I believe all of it is covered in the W3Schools tutorials.
  19. Trying to round the courners of my submit button

    This is the button you are trying to give rounded corners to: <input class="submit" name="submit" pbzloc="50" size="1" style="font-size: 1.2em; height: 51px; width: 143px; color: white; background-color: #ff0000" tabindex="502" type="submit" value="Submit" /> It has "submit" as the value of the class attribute, therefore we use the class selector ".submit" to target the element.
  20. Trying to round the courners of my submit button

    It looks like something that's being generated by the software that's building your page. You should learn more about CSS selectors. The issue you had was simply not applying the style to the correct element.
  21. how to detect which page im on

    That provides information about the current PHP file that's running, but says nothing about what URL the user is currently visiting.
  22. easyphp can not connect to db

    My only guess is that there is no database named "loginapp". You forgot an echo statement here, so this line of code won't show anything: if($database){'DATABASE FOUND';} You should not be using the mysql_* functions, they have long been deprecated in favor of proper secure database libraries, as of PHP 7 they have been completely removed. For database operations, check out PDO http://php.net/PDO
  23. Trying to round the courners of my submit button

    .submit { border-radius: 20px; }
  24. Let's start off at the very beginning. These are your requirements: But you have another requirement: So to summarize your requirements: Display popups on the page any time it loads except under the following conditions: The user arrived on the page from clicking that image. The user has refreshed the page. Now we have to determine the following: How do we know that the user clicked on that image? How do we know that the page was refreshed? The resulting logic should be very simple: if(!clickedOnImage() && !pageRefreshed()) { showPopups(); } function clickedOnImage() { // Return true if and only if the image was clicked // Return false otherwise } function pageRefreshed() { // Return true if and only if the page was refreshed // Return false otherwise return performance.navigation.type == 1; } function showPopups() { // All the code that creates the popups is in here // This code is irrelevant to the problem we're solving } How do you want to detect that the request came from the image? Is it alright to pass data in a query string or hash in the URL? You could make the image a link with the following href attribute: href="overview.html?fromimage=1" and then use the location.search property in Javascript to check for that value. Another option, if you only care that it came from the page that the image is on rather than the image itself, is to check the document.referrer property. clickedOnImage() returns true of document.referrer is " http://www.grammarcaptive.com/single_payment_acknowledgment.php "
  25. I was not referring to PHP sessions, I was talking about Javascript's local storage API, but using PHP probably works as well.