Jump to content

maxxd

Gurus
  • Posts

    1,664
  • Joined

  • Last visited

  • Days Won

    52

maxxd last won the day on May 26

maxxd had the most liked content!

About maxxd

Contact Methods

  • Website URL
    https://maxxwv.com

Profile Information

  • Gender
    Not Telling
  • Location
    North Carolina

Recent Profile Visitors

25,019 profile views

maxxd's Achievements

Prolific Member

Prolific Member (5/5)

160

Reputation

42

Community Answers

  1. Use media queries to create rules based on screen size or browser device as requinix suggested. Though admittedly you may have some work ahead of you as WPBakery (as far as I recall - thankfully it's been a while since I've had to deal with its output) has a tendency to overdo it with the built in CSS.
  2. Just a point of clarification, in this case json_decode is returning an object not an array. To access any of the values in the object, call the property key. For instance, to loop through the players you'd do this: foreach($obj->event_match_details as $detail){ echo "{$detail->playerfirstname} {$detail->playerlastname}" }
  3. So you're saying you don't like HTML?
  4. I hope this makes sense - it's how I thought about it a millennia ago when I was learning php - you can mix php and html, but you can't combine them. In other words, as Barand said above, if you want to output html without using the print or echo functionality of php, you need to exit php mode and enter the browser's default mode of html output by using the '?>' php closing tag. By the same regard, if you intend to inject php into your html you need to specifically enter php mode using the '<?php' opening tag. There are obviously exceptions to this (certain templating languages, etc.) but these are things to think about later on - right now don't worry about it. Just make sure all of the php code you're executing within html is contained in the '<?php ?>' tags.
  5. Where is the data coming from? There could be several different reasons why you're not seeing whatever it is you're expecting. Which is a good point - what exactly are you expecting to see?
  6. What you're seeing is the default landing page for Laravel. If you're surfing to http://localhost:8000/ it's matching the '/' route in the web.php file, so it'll render the welcome.blade.php file. If you want to see your questions/* routes you need to request them - go to http://localhost:8000/questions.
  7. First and foremost, don't run the query in a loop. Chances are you can use a join to get a full dataset before you begin your loop. The other benefit of doing this is that your data will more than likely present itself in a way that makes what you're trying to do easier. Can't help you with how to do that as we don't have all the code and what we do have is clearly not the actual code (there's no $sqlb2 for you to loop over in what you've posted).
  8. I take it there's a class called 'frontpage' with a non-static method called 'index'?
  9. maxxd

    Anti XSS

    Does that mean that you've made sure you're using prepared statements, nonces for your CSRF, and proper XSS request headers or do you mean you feel fine altering user input because what you have looks like it's working as it is?
  10. The image tag is the main element in this situation - it's wrapped in a picture tag (the container), and the src elements can be thought of in the same way that media queries are in css. You need to have the img tag in the picture element to actually display the image source as defined by the src elements depending on their media attribute. Basically, in your situation the <img> tag is the only actual element in the structure. The rest of it is conditionals.
  11. If I remember correctly, you need to add the class attribute to the <img> tag. The picture tag is a container, and the source elements replace the inner image tag at the defined breakpoints.
  12. XMLHttpRequest is a bit outdated these days with the rise of the fetch API. That having been said, the fetch API can be a bit rough to wrap one's brain around if you're new to it. Either way, one option is to add an additional parameter to the AJAX calls (for instance, 'ajaxRequest') that isn't set in the normal call expecting a full page refresh. Check for that extra parameter in the processing code and you know how to return the data - either a JSON string of just the data or the entire page. I'm a little brain-fried, so I hope that makes sense...
  13. This is where an MVC-style approach to the server-side code comes in handy. The display logic is in the view, and the controller decides what to return. If the request to the controller is AJAX-based (or POST, in this case) the controller returns JSON-encoded data whereas if it's not, it returns the full compiled HTML.
  14. Whatever you end up doing with the email itself, do yourself a favor and use one of the major libraries instead of php's native mail() function. I'm most familiar with PHPMailer, but I believe laravel uses Symfony Mailer. Either is going to make your like much easier in the long run.
  15. You require_once and use statements need to be outside the function; they're global functions. You can then use the classes inside a function. So, the instance that works, just put everything after require statements into a function and call it normally.
×
×
  • 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.