Jump to content


Popular Content

Showing content with the highest reputation since 07/20/2018 in all areas

  1. 2 points
    Applying opacity to a div affects everything within the div, including type and nested divs. Use background opacity via rgba() to do what you're wanting: body{ background: url("https://image.ibb.co/h93Ndo/abstract.jpg") top right no-repeat; background-attachment: fixed; } .body-container{ display: flex; flex-direction: column; justify-content: stretch; align-items: stretch; background: red; color: white; min-height: 100vh; } .header{ flex-grow: 0; background: rgba(58, 152, 253, 1); } .two-cols{ flex-grow: 1; display: flex; flex-direction: row; justify-content: stretch; } .left-container{ display: flex; flex-direction: column; justify-content: flex-start; flex-grow: 1; flex-basis: 20%; background: rgba(59, 74, 83, 1); } .content{ display: flex; flex-direction: column; justify-content: flex-end; flex-grow: 1; flex-basis: 80%; background: rgba(255, 255, 255, .7); } Also, is there any reason why you needed to add the !important to the display rule on the .body-container div? @gizmola - apparently I'm going to need to read that article as well as I've not found float collapse to be an issue using flexbox. Or at least I've not recognized that that's what it is... Anyway - thanks for the link!
  2. 1 point
    You're creating new objects all over. That's weird. There should be exactly one request and one response at a time, and they should be created early on in the process. Probably one FrontController too. Look through all your code for any time you're using "new" and decide whether you really do want a brand new instance every time - if you do then you're probably singleton-ing stuff that should not be; prepare your framework so that you could run multiple request/response pairs in one execution, like if you wanted to do an internal redirect or for testing. This normally works like 1. First file (eg, index.php) gets/creates the FrontController 2. Same file also does some sort of Request::getFromCurrentRequest to get a request object 3. Same file, or the FrontController, or the Request, creates a corresponding response object 4. FrontController runs the request The Request and the Response are both available to the code that needs them. Want to change to a 404? Do that on the Response. The Response class shouldn't take any action until it's actually ready to return the response. Don't http_response_code() yet. Track it internally, default 200, and let it be changed by whatever wants to change it. When the request completes and it's time for the response to be sent, then it uses http_response_code() or whatever.
  3. 1 point
    What are you trying to do? I'm a PHP tinkerer at best, with a lot of help, but I've been using PHP in WordPress for about a decade. If you're talking about creating a plugin, that's a process that's pretty easy to start, but really tying it into your site, you'll need to study up on WordPress' codex and template tags: https://codex.wordpress.org/Template_Tags If you're talking about putting information onto certain pages, now you're talking about inserting PHP into a page, which isn't native in WordPress. I'd get a plugin called PHP Code Snippet by XYZscripts. It's fantastic, and it allows you to easily use code snippets through your site. From there, I use INCLUDES to associate PHP files to my WP Pages, and I update the PHP files in any text editor. I would recommend checking out the Template Tags no matter what. You can use them in your PHP files just for simple calls, as a lot of what I do involves referring to items within WP.
  4. 1 point
    In what tutorial did they tell you to duplicate the opening and closing HTML tags? All these tags and the closing counterparts only go in a document ONE time. <!DOCTYPE html> <html> <head> <title>Copyright 2018</title> <link rel="stylesheet" type="text/css" href="style.css"> <link href="https://fonts.googleapis.com/css?family=Aldrich" rel="stylesheet"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous"> </head> <body>
  5. 1 point
    In fact, the cause is exactly the same reason that it was in your post on July 5th The idea here is for you to read the replies.
  6. 1 point
    Plus - you are getting only True/False values in your variables from those isset() calls. Don't you want a real value instead?
  7. 1 point
    Most things in a simplexml array are a simplexml objects. It is often necessary to cast elements as string types EG $title = (string)$row->title;
  8. 1 point
    The best way to get get an answer to that kind of question is to run timing tests on the options, $t1 - microtime(1); loop if ( MOSTLY_FALSE == true && ALWAYS_CHANGING == 1) { // do this exceptional thing } endloop $t2 = microtime(1); output ($t2 - $t1); Repeat for all options and see which is faster.
  9. 1 point
    Well, can you put them in the form somehow? Traditionally that might be done with <input type='hidden'>, if it's not possible to move the <form> tags to the appropriate locations. If you can't do that, I'm not sure what to tell you, because that sounds like front-end type magic (AJAX). Well, I kind of showed that in a more/less procedural style in my post above. If you want you could wrap that in a function; keep in mind you'd need to either declare $db to be global or establish a connection (or connection object) INSIDE your function. As Barand showed you, PDO or the newer MySQL(i) both assign the ID of the last inserted value to $db->insert_id; you can assign this to a variable and use it in your final SQL statement.
  10. 0 points
    FYI Experts, this is the infamous uniqueideman posing as yet another user after being banned and shunned on numerous forums including being banned on phphelp.com just this morning. OP is a help vampire. Stop feeding him and he will go away. Edit: Just saw @mac_gyver already outed him.
This leaderboard is set to New York/GMT-04:00
  • Newsletter

    Want to keep up to date with all our latest news and information?

    Sign Up

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.