Jump to content

mac_gyver

Staff Alumni
  • Posts

    5,449
  • Joined

  • Days Won

    174

Everything posted by mac_gyver

  1. and the answer to Kevin's question? - the code you have posted so far, implies the data is being processed three times. if you had a database driven site that worked and looked the way you wanted it and the recent coding was just to support entering the data on the back end, that's the only thing that should have been affected.
  2. some portion of the web site code may be including/requiring the cron-index.php file. perhaps whomever coded this thought they would do the cron-index.php processing any time the web page is requested and there are pending ftp files to be processed.
  3. moving thread to the correct forum section... Please use the forum's bbcode tags (the edit form's <> button) when posting code.
  4. best guess is because different browsers can submit different form data for the same html markup and your code needs to take that into account. you need to debug what data is actually being submitted and what your code is doing with that data. if you want us to help, you will need to post the relevant form and form processing code.
  5. so, the code you posted isn't the complete and actual code, despite being asked and you confirming that it was. you do realize that it will take having all the relevant information about this problem in order to find the solution? are you using the same database username in phpmyadmin as you are using in your php code?
  6. you need to read documentation and examples in order to use programming languages. it's simply impossible to get them to work in any reasonable amount of time if you don't. the SQLite3::query method - to fetch the data from a SQLite3Result object, you must use the ->fetchArray() method - http://php.net/manual/en/sqlite3.query.php
  7. it's not php that is dealing with the partitioned table. it's the database server. php only sends the query statement to the database server and gets the response back from the database server. phpmyadmin is just a php script. if it operates differently from your php script, its likely because the phpmyadmin script is running on a different server from your web server or is configured differently. can you confirm if phpmyadmin script you are using is on the same server as your web server or on a different server? also, can you check if phpmyadmin is using the mysql or mysqli database library? is the code you posted your complete script involved, less any database credentials?
  8. your php script that is being executed via the cron job is probably being directly requested by a browser/search-engine-spider/bot-script. your server's web access log should show the who, what, when, and where it is being requested. you would want/need to put such a processing script in a location where it cannot be requested via any external source.
  9. the line of code you posted isn't where the problem is at, just where the problem is being reported. the problem is due to something in the few lines before that one. post at least 5 lines immediately before the $sql = .... line.
  10. except that's incorrect. the value that was assigned is tested. a value that is equivalent to false will result in the else {} branch being run. give this a try - if($a = 0){ echo 'zero'; } else { echo 'not zero'; }
  11. i'm going to go with 'what is pagination?' for my guess, Alex
  12. it's beyond the scope of a help forum to write or find code that does exactly what you want. we can however help with problems, errors, or specific questions you have with some code you wrote. you would need to post the relevant code and a statement of the problem, error, or question you have.
  13. in the browsers it does/still work, are you already logged in? try logging out in them and see if you get the same symptom. if you set php's error_reporting to E_ALL and either display_errors to ON or log_errors to ON, you will likely get php detected errors displayed/logged that would help you pin down the problem. if you want a forum's help, you will need to post the relevant code so that someone might see what it is doing that could cause the symptom. i'm betting at this point that you have some output being sent by your file that is preventing the cookies from working, but the browser's that do work are already logged in and the cookie code isn't being executed.
  14. a syntax error in a php.ini will prevent any statements after that point from being parsed. have you checked your web server's error log to see if there are any startup errors that might be helpful.
  15. have you checked if the php.ini you are using is the one that php is loading. what does the Loaded Configuration File output from the phpinfo() show?
  16. you need to debug what your code is doing once you submit the form. i'm willing to bet the login form is doing what it is supposed to, but it goes to the login processing code, doesn't login, and redisplays the log in form. what is the form processing code at - '/index.php?mode=login'
  17. mysql_connect('localhost','root',' '); is your password really a space ^
  18. you must check if the upload worked before you can use any of the uploaded file information. see my replies in the following thread - http://forums.phpfreaks.com/topic/282415-need-clarification-on-why-no-error-message/
  19. for the three values you are doing that for, it's common practice to simply leave the column/value out of the query statement and let the database assign the default value defined for the column(s) not listed in the query.
  20. for the pdo statements to throw errors, you must configure your instance of the pdo class to do so, either when you create the connection/instance of the class or via a separate call to the PDO::setAttribute method. the only thing apparent in the posted code is that the php null value the code could be assigning to the array entries isn't the same as a database null keyword and are likely producing query errors. if you are trying to use a database null keyword, it needs to literally be the letters n,u,l, and l (with no quotes of any kind around it). however, when you supply the data via the ->execute() method (rather than binding the parameters), all the values are treated as string data and are enclosed by single-quotes when inserted into the query statement.
  21. 1) the @ error suppressors you have in your code are probably hiding related errors, that the web host doesn't permit reading external urls. you need to remove all the @ error suppressors and have php's error_reporting set to E_ALL so that you know everything that is not working in the code. 2) have you echoed what getImage($tags) does return so that you know it is an actual complete expected value?
  22. you would use an array for the form field name='data[id][column]' attribute, where the column value is the database table column name and the id is the row's id. when the data is submitted, you would loop over the data for each id/row, then you would loop over the submitted column names/values for each id/row.
  23. best guess is your code is expecting a user to free-form enter values in a specific format and they aren't and your code isn't validating the entered values before using them. your post contains little actual information upon which to help you, such as exactly how the values are being input, what exactly is wrong with them (saying something is corrupted could mean any of about a dozen different thing in programming, each having a different cause), what your relevant form and form processing code is, and at exactly what point and by what method are you observing the incorrect values. <----- edit: lol, 1000 posts.
  24. you would declare a css class to use the color red. then when you are outputting the values form the array, for the value you want, you would surround it with a <span></span> tag with the css class you have declared.
  25. it's likely your version/configuration of php isn't recognizing the <? at all and that specific line of code wasn't being seen as being php code. when you change to the full opening <?php tag, it's now being seen as php code. the correct way of testing a variable that might not exist is to use isset() edit: lol, the forum's pop up about posts being made came after i hit the submit button and listed 2 new posts having been made, trq's and mine.
×
×
  • 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.