Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by PFMaBiSmAd

  1. Yes, a session will exist as long as the browser has not been completely closed.
  2. You have posted a grand total of 6 lines of code out of your whole program. How would anyone here know how your code created the problem or what to fix in it to prevent it.
  3. They mean nothing. It is your data and your code. You are either setting them to those values (an 'T' + 1 is a 'U') or you are treating the number as an ascii character and it has been incremented to the value of a U/T.
  4. Where are you setting or getting $matches from? You are likely setting it to 'T' or 'TRUE', probably by a comparison that is actually an assignment statement (i.e. one = sign instead of two.) Also, you don't need to SELECT a value in order to UPDATE it, just increment the value IN the UPDATE query.
  5. Frankly, this thread IS the same problem as in your existing thread from yesterday. Based on reviewing that thread, you don't seem to be even executing the query in the code, so of course it is not working.
  6. Does your error checking and error reporting logic in your code indicate that the mysql_query() statement executed without errors and does your mysql_affected_rows() statement in your code indicate that the row was updated or not? Short answer: Just posting a query statement out of context does not help anyone determine why it doesn't work. You have got to determine what your code IS doing to pin down which of the several possible reasons it might not be working - You could have a problem with your connection to the database server; a problem with selecting a database; your $tbl_name2 variable might not have anything or might not have the correct thing in it; your column name(s) in the query might not be correct for the table you are using; you might not be executing the a mysql_query() statement at all or it might not have the $sql variable in it...
  7. ^^^ That error is also pretty self explanatory: You must select a database to use. Are you actually reading any of the error messages you are getting?
  8. ^^^ And your sure that code is being executed?
  9. What's your code that is connecting to the database server and selecting a database to use?
  10. Php is a server side scripting language. Any php code on a page is executed when the page is requested. onclick events occur in the browser. The only way that a browser can communicate anything to a server is by making a HTTP request to the server. If you want a HTTP request to cause a specific php function to be executed on a page, you must pass some identifying piece of information to that page as part of the HTTP request and the code on that page determines that is needs to call the function in question.
  11. The name="..." attributes of your form fields are not $_POST['uruklink'] and $_POST['ketabsetlink']
  12. If you echo mysql_error(); it will tell you why any query is failing. For one of the queries, you will find that order is a reserved mysql keyword (as in ORDER BY). You should either rename your order column to something else or you must enclose it in back-ticks `` every time you use it in a query.
  13. foreach($v['Room'] as $k2=>$v2){ if(is_array($v2)){ // your existing code ... $v2['Name'] will exist } else { // $v2 is the value of each element of $v['Room'][], i.e. $v['Room']['Name'] and $v['Room']['Id'] // I would probably add a $k2 to the foreach() so that you can do something like - if($k2 = 'Name'){ // code for the name element here... } } }
  14. ^^^ Only if you are not validating the external $_GET['page'] value AND the setting that permits a URL to be used as a source in an include statement is turned ON. ^^^ Only if you are using outdated (~8 years ago) code. If you want help with your code, you would need to post it.
  15. You need to define what you want your code to do and what your table structures are before you write any of your code or your queries. As thorpe has already pointed out by looking at your code and your table definitions, your auths table does not contain a column named done and your pins table does not contain a column named used. In fact, none of your tables contain columns by those two names. Since we don't know what you intended your code to do and don't have the slightest idea what column names you did want to use in those two queries, you, the programmer writing this code, are the only one here who knows what the queries should be referencing and would be the only one here who knows if you intended those tables to have those columns in them or if you intended to use column names that already exist in those tables.
  16. For what it's worth - $post = (object)$_POST;
  17. Are you sure you have a [9] and [10] element in the zero'th row? What does the following show - echo '<pre>',print_r($bobreport,true),'</pre>';
  18. prepare, bindParam, and execute are used together and used with replaceable parameters/placeholders, not with the query method.
  19. If you got error code 2, then the form you posted is not the one that you used in your browser. Any chance you changed the form code but did not refresh the form page in your browser to get the changes to take effect?
  20. number_decrypt() just tests if the supplied value in $plain is the value that produced the given $encrypted (hashed) value. Sadly, those functions, despite the unfortunate names given them, neither encrypt or decrypt anything because encryption/decryption is a two way process. Those functions are using a md5 hash/checksum and it is a one way process. Once you have the hashed value, the only thing you can do is test if a value that is hashed using the same algorithm matches.
  21. So the variable $link is either empty or does not exist? Are you sure you have a column in your database table that is spelled and capitalized exactly the same as 'link'?
  22. Php does perform some short-circuit optimization like what you are suggesting, but I doubt it does it in the case of a value returned by a function call. This would be something that you would need to devise a test for and determine yourself what if any optimization it is performing for any particular case.
  23. For what you are doing, there's absolutely no reason to be using eval().
  24. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=313023.0
×
×
  • 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.