Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by PFMaBiSmAd

  1. You do understand that code is executed from top to bottom and that variables don't have values in them until the code that assigns a value has been executed. You are trying to use the variable $Gen_Contact_ID in your code that is building the string in $Query before $Gen_Contact_ID has been assigned a value. Are you developing and debugging php code on a system with error_reporting set to E_ALL and display_errors set to ON in your php.ini so that php would report and display all the errors it detects? You would be getting a undefined error concerning $Gen_Contact_ID when you try to use it before it has been assigned a value.
  2. As far as the web server is concerned, the http requests that AJAX makes are identical to the http requests due to clicking on a link or typing a URL into your browser's address bar. Your browser will send any cookie/session id cookie that is valid, has not expired, and matches the URL/page being requested with any http request that is made via AJAX or any other method.
  3. Define: but still not working for me. What is it doing vs what you expect? We are not standing right next to you nor do we have access to your server, your database, or your complete code so you must state what you see in front of you if you expect someone in a forum to be able to help you. Based on the color highlighting in the posted code, you have a php syntax error due to an extra "; in the code.
  4. Your code that is building $recordsSC is after and outside of your while(){} loop that is retrieving the data, so of course it will only get the last value retrieved. You would need to put that code inside of the while(){} loop for it to do something with each row that is being retrieved. The $length variable should hold the maximum value for each GROUP BY species_id, but you are aware that is only going to give you the maximum length in each group, the other column values are actually gong to be from the first row in each group. If you are actually trying to get the row in each group that has the the maximum length, you will need to use the techniques at this link - http://dev.mysql.com/doc/refman/5.1/en/example-maximum-column-group-row.html
  5. The path to "./connection.php" must be correct so that require() can find it, otherwise require() halts program execution, resulting in a blank page from that point onward.
  6. If you have an object before the call to object2array() but code inside the function reports an error about not receiving an object, it is likely that part of your code that is not being shown here is calling that function a second time with non-existent data or the code you have been posting is not the actual code running on the server that is generating the error message.
  7. Nothing is returned from the function or the HTML produced in the function is returned without the values where the php variables are at or you get a completely blank page?
  8. If you echo mysql_error() on the next line right after your mysql_query() statement, it will tell you why the query is failing.
  9. Your code inside of your while() {} loop is reusing the $query variable, so when the while loop condition is evaluated after the first UPDATE query is executed you get an error because $query no longer contains the result resource from the first query.
  10. You have not exactly provided any information showing what you are trying to accomplish and what the result should be for any given data. Based on the code in your previous thread, doing what I stated in this thread will work.
  11. Since you did not provide any information as to what it does do when you tried it, no one can directly help you with the dozen possible things that could prevent it from working on your server. What result did you see in front of you when you submitted the form?
  12. If you have additional information or clarification to add to a thread, add a post in that thread. You can 'BUMP' existing threads -
  13. Generally you troubleshoot missing data values by starting where the data is produced and determine at what point it no longer exists. Have you checked if your form (the first step) is even submitting the data to the form processing code? There may be nothing functionally wrong with the code you posted (the last step.) The garbage you are getting out might in fact be due to feeding garbage in, though your validation logic in the the form processing code should be checking each piece of data to make sure it is what is expected before you attempt to put it into a query.
  14. Your editor is saving the files as UTF-8 encoded files and the extra characters at the start of the file are the BOM (Byte Order Mark) characters. Save the file without the BOM if you must save it as a UTF-8 encoded file OR save it as an ANSI (ASCII) encoded file.
  15. What does adding the following after the line with the simplexml_load_file() statement show - var_dump($output);
  16. You already have an existing thread for this problem. Don't start another one. That just looses the history of how you got to this point and what has already been tried, which wastes time for those who already tried to help and those who would.
  17. To do what was asked, you would need to use a query like sader posted.
  18. The error message indicates that there is a mail server installed and running. The From: address must be a valid email address at the sending mail server to both get your mail server to accept and send the email and for receiving mail servers to accept it.
  19. Use - LIMIT 1,1
  20. Either your web server is buffering the output or you perhaps have a proxy server that is buffering the output. You would need to disable or satisfy all the buffering involved. If this for a general purpose application, you must also satisfy the minimum-block-length requirement of the different browsers. Short answer: Web servers simply are not designed to operate this way. You should be using AJAX and have the client make periodic http requests to the web server to get the current status.
  21. If you change the || die ( mysql_error()); to or die ( mysql_error()); then the die() statement will be evaluated and output the mysql_error() message that will point out the problem. Using || does not work because the || has lower precedence than the = assignment operator.
  22. There's really no way you can effectively use a function in a programming language until you have studied the documentation so that you know what it accepts as parameters, what operation it performs, and what value it returns - http://us2.php.net/in_array
  23. Just put a list of the possible values into an array and use in_array() to test if $line is one of the values to determine if $message should be set to $message = $line.$user;
  24. Where is $rma_devices being set at?
  25. A) You have spaces as part of both your opening and closing php tags. They should be <?php and ?> B) PHP is a server-side scripting language. It is parsed, tokenized, and interpreted on the web server when the page is requested by the browser and the browser just receives any output that is produced. You should be browsing to the file using a URL something like http://localhost/your_file.php
×
×
  • 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.