Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. { "correlationId": "6c2dc370-59a0-11eb-893a-0223445bacd9" } Is that the JSON you're expecting to receive? If so, everything is going right - except for the part where you told cURL to return the response headers in its output, which you probably don't need to care about.
  2. I can't tell what you were trying to ask, but I think the answer is still what I said before.
  3. So what's the question? Oh, found it. Some existing framework or strategy to do what part, exactly? If the general problem is how to deal with multiple MVC frameworks, the answer is typically to have a code interface that does as much work as possible so that the framework endpoints can do as little as possible. If you're asking about literally converting JSON to HTML, I think the coolest option is to forget JSON and go with XML. Because that can use XSLT to render the data however you want.
  4. Add the if_gender to the list of SELECTed fields as well as the GROUP BY. Then you'll get one set of results that shows the count per age range and gender.
  5. Okay. Well, so far all you have to work with is "Cannot POST". That's not helpful. How about getting some more information? Perhaps why it thinks it "cannot POST"?
  6. Okay. What's trying to POST to it?
  7. /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/ $sql = "SELECT * FROM $tablename WHERE $current_epoch BETWEEN $start_day AND $end_day"; /** NEED TOQUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! If you have code outside the function that is capable of querying the database then it should be a fairly simple matter of moving that code into the function. Note that running the query requires having the $conn variable, so you'll need to pass that into the function as another argument to be able to use it. It also requires those two variables in there, which currently aren't being set.
  8. Yeah, no. It just means you have to define a $htmlTitle variable in the code before it includes html_head.php.
  9. Use index.php for all three of them.
  10. The error message in your title means the server is not running, or at least not running on the port you're trying to connect to.
  11. Forget the menutitle. Forget it. Look at the CSS rules being applied to the heading. Two of them involve text-transform.
  12. This has nothing to do with .menutitle. Are you familiar with your browser's developer tools? If not then you really need to spend some time learning about them. Open your developer tools, find the menu, and consider applying the mHover class manually to force it open. Then navigate (in the tool) to the heading's A or SPAN and look at what CSS rules are being applied. I see three rules whose selectors all have a > chain that targets the link. Two of those have text-transforms.
  13. Normal Javascript strings do not work across multiple lines. If you're putting a value into Javascript then use @json instead. You should basically never ever use {!! for anything.
  14. I see one "text-transform: uppercase !important" and another "capitalize" (not !important). So obviously the !important one will override. Throwing !important on the second won't fix it because all you've done is make them of equal specificity, so the one defined later wins. Seems like you've got a lot of duplicate rules and a lot of !importants in there. Both of those are indications of problems with the CSS. Look through what you've got, cut out as much as you can without severely breaking everything, and try giving it all another shot.
  15. I think you might have confused a PHP dump of an array with a string that looks like the PHP dump of an array. $data needs to be an array. Build that array in, probably, the most obvious way that you can think of.
  16. That code will never add the WHERE to the query. What's your actual code?
  17. Looks alright. Is that the same information you see on the first page (which sets a session value) and the second page (which is unable to get the value back out)?
  18. But are you doing that for every place that calls session_start()? It's still better to configure the session cookie in your php.ini, not in code. Never have to think about it if it's configured there. There's more to a cookie than just its expiration. What are the details of the cookie as seen by your browser? I'm talking like domain, path, and flags.
  19. Yes. The content and structure of the page matters far more than its URL.
  20. Urban myth. Google does not care. People care. People like it when they see a picture of a dinosaur and there's the word "dinosaur" somewhere in that magic box on top of the screen where they type stuff and Google searches for it.
  21. Yeah. And I'm saying don't do that. It doesn't work. It's incorrect.
  22. { query: encodeURI(url) } That is the place that lists out the values to pass. You are only passing one because you crammed the query+c+country into the value. Keep the "query" being the query and add a "c" for the country.
  23. Unfortunately my crystal ball has exploded so I can't use my supernatural powers to instantly know everything there is to know about your application and code. So we'll have to do this the hard way by having you use your fingers and keyboard to type out the kind of information that is important for someone like me to have if I'm to tell you where the problem is. The "File upload failed" message means your INSERT query failed. Why did it fail? To find that out, try using PDO::errorInfo.
  24. You cannot use anything in $_FILES until after you've tested to make sure there's something there to use. In other words, you can only set and use $fileName inside that main if block.
  25. Browse around your site and make sure the browser always says the page is encrypted, or at least it never says it isn't encrypted. With Chrome, for example, a padlock icon on the left of the address bar means it's HTTPS.
×
×
  • 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.