Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Posts posted by ginerjm

  1. Why are you fetching an object when the result is just a simple value? Try:

    //Get the results
    $inbox = $inboxQry->fetch(PDO::FETCH_ASSOC);
    $cnt = $inbox['unreadCount'];
    
    //Prepare the output based on results
    $html = "You have $cnt new messages";
    echo "<div class='FooterText'><a href='Inbox.php">$html</a>";
    

  2. You don't understand normal English. I asked for an explanation without using CODE and all you give me are sites which I choose not to click on.

     

    What do these sites have to do with your script? Don't answer that. Just explain what is going on here.

  3. I looked at your code. I have no idea what you are trying to do. Can you explain in plain English what you are doing without using code to make your point? I really don't know what you want. It appears you want to do something with a query string as I said before, but where does this come into play??

  4. I don't know which is worse. Your English or your PHP. Did you even read your text prior to hitting the Post button?

     

    Ok - you want to modify the non-numeric values only. Got that. And you only want to change the values. So why do you start out changing the key first thing? Using is_numeric is going to fail (tried it) because having that dash in the value automatically makes it NOT numeric. If your pattern is consistently as you stated, you could do a trial replace from _ to a dot which would then be acceptable as a numeric value. THEN you could make your ultimate change from dot to null.

     

    PS - you do realize that when the foreach completes, the values in the GET array will not be altered with your current code.

    • Like 1
  5. Didn't notice the ext. nor do I care. The poster needs to understand that not everyone willy-nilly clicks on attachments. That said - he/she should also show us the specific code that needs addressing by this forum and if he/she posts too much that will also be pointed out.

     

    I'm guessing that the poster did not write this code and basically knows very little PHP since the question appears to ask how to handle a query string from a url. A pretty basic question that any php coder should be able to handle.

     

    I await his/her response and we'll go from there.

  6. Did you write this code? What do you need help with specifically? Since you didn't post it I can't see it but the question is rather vague. Perhaps you could POST the code and elaborate on exactly what you are trying to achieve, along with your attempted code so far?

  7. PHP gets its input from form elements via the Get and POST arrays. You know that, don't you?

     

    Sorry - now I see that you are parsing this by reading some other script.

     

    So you are beginning to use the dom functions. Have you read up on examples of how to parse that document yet?

  8. How about reposting and using some punctuation, some proper code tags and breaking out the code from the text and EXPLAINING what it is you have done? Your current post is a mess to read and understand.

  9. So - how long does a user have to respond to a challenge? Can he just ignore it or must he respond in a certain time?

     

    From what you say, you will have challenges stored in your db with a userid. That user logs in and runs a query script that pulls up a set of challenges containing his id. The script outputs a display of the challenges with enough info for the targeted user to decide what to do and he then clicks an Accept or Decline button next to that row's data.(An html table would be nice here.) Or you could just run the query for the oldest challenge and respond to it and then let the script produce the next challenge.

×
×
  • 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.