Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Posts posted by ginerjm

  1. That's the problem when one chooses to download someone else's script. You have bugs in them and have to figure them out. As for forum help - we usually try to help those who help themselves by writing their own code. In your case you are taking the easy way out here. First you copy someone's code. Then you want someone else to fix it for you. Not my intent when reading the forums.

     

    I will say this tho - when you get the "header already sent" message it means you are trying to send a header to the client but that something has already been sent and a header must one of the first things to be sent. You have to find where you are sending some output - anything at all - and stop it from being sent first. It could be as simple as a blank line outside of php mode, or a space character that shouldn't be there. Have to go thru all the code to find it. Try exiting your script just prior to the line that is triggering the error message and then go view the source code sent to your client and see what it there.

  2. As you said, write some code.

     

     

    The forum is for people who actually are trying to write code. It is not here to just figure out what you are talking about it and come up with your solution for you. Try to code it. If you can't then try to learn by reading and researching and becoming a programmer. Or go to the forum designated for professional help and pay someone to write your code for you.

     

    You might also re-read your post and correct the language so that it tells us what you are talking about. I know I'm confused by your post.

  3. Use an outer join in your query. Look it up.

     

    PS - this is a good example of what happens when a programmer makes assumptions and doesn't explicitly check the results of things like query executions, file opens, etc. Always, always, always check things.

    • Like 1
  4. I wouldn't do it. Not knowing how this stuff runs and how to set it up securely and safely and properly is the kind of stuff that people get paid big bucks for. If you hired someone to develop this for you, why are you not hiring someone to run it for you?

     

    Either consider outside help again or start reading.

  5. During development you should NOT be hiding any errors. YOu should be programming around them - that's what good coders do. Remove the @ signs and be sure you have php error checking turned on and see what your script might be trying to tell you.

     

    And of course your filenames could be a problem if you are looking for the wrong case in the name.

  6. When something "didn't work" it usually helps all concerned if the voicer of that meaningless comment provides some backup as to WTH he/she is describing. Someone who was nice enough to provide a goodly chunk of code to you deserves more of a response than this so that he/she can help possibly debug it or to further discuss with you the problem.

     

    Jeez!

  7. My previous question re: testing your query result was not answered. Do you in fact have code that tests the result of your query function call? Show us that code and also the complete query statement that you are trying to execute. Use an echo if you have to in case you are building it with php values in it. Something like this code:

    $q = 'select (stuff) from (table) where (condition)';
    $qresult = $pdo->query($q);
    // test if query ran
    if (!$qresult)
    {
    echo "Error - could not execute query #1. Query is<br> $q";
    exit();
    }
    // process valid query results here.
    

    Note: the parens in the query statement are only there for example.

  8. Do some things that experienced programmers do everyday. Add error checking when you do things that could go wrong. Things like opening up a file, or running a query. How do you know it actually happened if you don't check? When you read the manual ( you did read the manual?) didn't you wonder why many of these functions return a Boolean value? It's there so you can check the success or failure of that function.

     

    Make your life easier by using the list() function to capture the csv fields. This will give you real field names instead of an array with numeric indices. Makes it easier to follow what you are doing especially when doing debugging.

     

    BTW - why are you inserting only one field when you have all that data?

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