Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

LLLLLLL's Achievements

Advanced Member

Advanced Member (4/5)




Community Answers

  1. class foo { // was this always allowed? public $bar = 'abc default value'; // or did older versions only allow this? public $bar; } I couldn't determine the answer to this question looking at documentation. I found some old code where no class had a default value. Maybe it was a developer preference, but I was wondering if older PHP versions didn't even allow default values? Just a question of curiosity.
  2. The JSON is valid. It gets parsed. result = JSON.parse( data ); The only error is that Chrome shows an error PRIOR TO PARSING. But there is no error in the JSON, and nothing has interacted with "data".
  3. I'm tired of PHP Freaks. Too many people trying to show their arrogance and not help. As I have stated, the error is before any parsing. The parsing is always successfu. The error occurs immediately when DATA has a value. You're the only one mentioning magic. Nothing magic is happening. I'm done with this thread. Getting no help and never will.
  4. Yes, I put a breakpoint there -- which means BEFORE that line has executed -- and the error already occurred. Proceeding past parse() is not an issue. It is a proper JSON object.
  5. But the JSON blob can be parsed, so it's not an invalid blob. Besides that, nothing has interacted with "data" at this point, so where would an error come from?
  6. I'm getting "Uncaught SyntaxError: Unexpected end of input" (VM4193:1) on this AJAX call: MakeRequest : function( blah, blah ) { $.post( blah-blah-url, obj, function( data ) { var result = null; try { result = JSON.parse( data ); } catch (err) { } SOMETHING.HandleResult( result ); }) .fail( function() { }); }, ... the odd thing is, I get this error in Chrome before anything has actually happened in the result. What I mean is: when I put the breakpoint on result=null, the error happens right there. The parse() function has no error, so... what on earth is going on? I'm not sure how to be any more clear on this or what to add. It's quite standard stuff. The JSON blob that's returned is obviously valid... so I wonder where that error is coming from?
  7. Oops, I'm sorry I messed had some extra stuff in a third table that messed up the query.
  8. But what if I want everything from users (u.*), and just the one column from logins? This seems to be where I'm getting duplicate rows.
  9. This seems like something I've done several times a year for years, but I can't seem to get it. I can't find a solution on Google that works, although the question was asked many times and answered, too. Also, I'm low on sleep right now. Let's say I have two tables: USERS USERS_LOGINS I want to join the tables and get one row per user, with only the latest login row. Assume "UserId" is the pk/fk and there's some sort of LoginTime in the USERS_LOGINS table. So I will get results like: - Brian 8/4 - Mitch 8/3 - Jerry 8/2 I appreciate the help.
  10. You're talking about client-side code, not PHP code. You need an onchange event on your select element.
  11. There are lots of discussions about this topic online. My issue wasn't subdomain sessions being recognized by the primary domain (and vice versa), but rather just a subdomain handling things at all. You set something in the subdomain, refresh the page, and then the thing was unset. Here's what I currently have: session_name( "blah" ); ini_set( "session.cookie_domain", '.dev.example.com' ); session_set_cookie_params( 0, '/', '.dev.example.com', true, true ); setcookie( session_name(), session_id(), 0, '/' , '.example.com' ); session_start(); Things that were required, apparently: 1) Session name 2) setcookie Now with this setup, I can do this: start session in dev.example.com, access it in subsub.dev.example.com, go back and forth... session holds as expected. But what I cannot do, is: start session in subsub.dev.example.com, refresh page, have the session data hold. So lots of questions. Obviously the most important: why doesn't a session hold when I start the session in the subsub domain? Why is a session name required? (Is it?) Why is setcookie required when all I want to do is start a session? (Is it?) I don't use this step if it's a single-domain type of setup.
  12. There are two items using positioning in the header. We're done here.
  13. I'm not sure why you emphasize nearly, as if there is a lot of positioning on the page. There isn't. The relative div was added for the purposes of the text in the upper-right of that purple box (favorites of 2016), but that's the only positioning on the page. I can rework how that text gets to that spot... but my question still isn't answered. Any z-index added to the search results doesn't make it appear above the relative-positioned purple box. So the answer still isn't clear.
  14. Check out http://mainlypiano.com/ and start typing in the search box ("dav" will get you several results). Notice that the search box goes below the middle light purple box. There's no z-index here to cause an issue. If one removes the relative position of the light purple box, the search results menu shows in its entirety. That's weird, isn't it? (That messes up the "favorite albums" text there, which is the point of the relative position, but lets you see the error.) Any idea why this is happening?
  • 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.