Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by PFMaBiSmAd

  1. How exactly do you know that part of the file is being cut off? Are you just looking at the file size or are you looking at the saved contents of the file and comparing it with the original? Is there anything unique about the point where the file is being cut off, such as single or double quote characters?
  2. Are you actually uploading the file <input type='file'> or copy/pasting the contents of the file into the textarea and submitting the textarea contents?
  3. Perhaps start with the definition for a link - http://w3schools.com/html/html_links.asp You put the URL into the url portion of the tag and you put the text into the Link text portion of the tag.
  4. Any errors that were 'suddenly' displayed by that code when you executed it, were things that were problems in your original posted code or are problems in the config.php code that you did not post. The errors were always present but you didn't have the error_reporting/display_errors settings set to show them. How could you be 'programming' in php for four years and not know that you should have error_reporting/display_errors set to show you all the php detected errors to get php to help you find problems in your code? That must have been a frustrating and unproductive four years worth of coding.
  5. You already have an existing thread for this, where someone replied with the reason why your code does not work. In most programming languages, each function has its own isolated variable scope so that you can freely write any code and define any variables in the function that you need in order to accomplish the goal of that function, without needing to worry about overwriting any of the main program variables. Can you imagine how hard it would be to write a large application if you needed to keep track of all the variables you used to avoid any conflict between the main program and all the function definitions? You need to pass any values, such as your $tbl_13 variable, into the function as a parameter when you call the function.
  6. You would need to post what you did for that if you want help with why it did not work. Computers only do exactly what their code and data tells them to do. The only way for your code to get a specific intItemID value on a page is if you write the code to cause that to happen (there is no magic in programming.) Troubleshooting why your code and data is not doing what you expect involves YOU (we cannot do this for you because that would require complete access to all the relevant code and the data) checking at what point your code and data are doing what you expect and at what point they are not. I can guarantee that the problem will be somewhere between those two points.
  7. Nothing you have posted shows the form that is submitting the data, are you sure $_POST['intItemID'] contains what you expect? Your current code would be inserting a value if there is one. From my signature -
  8. You probably didn't refresh your form to get any changes made to it to take effect.
  9. The %d syntax is a sprintf() format specifier. It gets replaced with the correct parameter from the sprintf() function call, which you are not using. Since you aren't using sprintf() to build your query string, why not just put the $intItemID variable into the $sql = ""; statement, the same as you are doing with the $name and $message variables?
  10. INSERT queries don't have WHERE clauses, what exactly are you trying to do?
  11. Navigation links deal with URLs that the browser requests. Php include statements deal with file system paths that php uses to open and read a file. Links and include statements don't have anything to do with each other. You WOULD use $_SERVER['DOCUMENT_ROOT'] to form an absolute file system path to use in an include statement. A leading / on a file system path refers to the root of the current disk drive.
  12. You would need to post an example of what you are doing, because I don't think it has anything to do with making links in a navigation menu.
  13. You didn't show or state where the data is coming from, but you probably have some white-space characters (space, new-line) as part of the data and should trim() the data before you insert it.
  14. Posting your form, you form processing code, and the error message, so that we can tell what you are doing and what result you got, would be th quickest way of getting a solution. Best guess is you have use the wrong syntax in the MAX_FILE_SIZE value.
  15. Then it's likely your javascript and/or html and/or css is the problem. Posting all the code needed to reproduce the problem would be the quickest way of getting a solution.
  16. Assuming that what you posted was AFTER you attempted to upload a file, the $_FILES array will be empty for the following reasons - 1) Uploads are not enabled on your server. What does a phpinfo(); statement show for the file_uploads setting? 2) The HTML of your form is invalid and the browser is not bothering to actually upload the file. What's the current code on the page? Also, Firefox won't upload a zero length file. 3) You are exceeding the post_max_size setting. What size file are you attempting to upload and what does a phpinfo(); statement show for the post_max_size setting?
  17. LOL, The C code in php for sessions that deals with register_globals and session_register. Now let me see, just where exactly did I put that variable I wanted to save to the session data file... Session_register actually works with register_globals off (for those people who still have session_register statements in their code) and causes the contents of the variable you registered to be what is saved to the session data file, not a preexisting $_SESSION variable you thought would be saved to the session data file when your script ends, unless you assign a new value to the $_SESSION variable, in which case the $_SESSION variable will be what is written to the session data file.
  18. A server module is an application that is built specifically to integrate with a specific web server. The converse is a more generic CGI (Common Gateway Interface) application. Also, see the persistent connection section of the php.net documentation - http://php.net/manual/en/features.persistent-connections.php
  19. Persistent database connections only work when php is running as a server module and even in those cases where they do work, you don't gain much. You must still call the code necessary to get one of the available connections/create a new connection if an existing connection is not available. You must also be using the new MySQL Native Driver, as it would appear (according to the tech writer doing the php.net documentation) that the MySQL database extensions do not support persistent connections when used with the MySQL Client Library. What exactly are you trying to accomplish?
  20. Don't attempt to pass session id's back and forth between HTTPS and HTTP connections, it is not secure. The person most likely to be monitoring your TCP/IP data packets is someone with access to the wired network or an unencrypted wireless connection that you are using. They can impersonate your computer perfectly, all the way down to the IP address that the server sees (because they connect to the server from the same network you are on) and if they get your session id when it is sent back and forth over a non-HTTPS connection, they can do anything on the server that you are permitted to do when you are logged in.
  21. See this thread - http://www.phpfreaks.com/forums/miscellaneous/can-i-pass-sessions-from-an-ssl-to-regular-url/
  22. If you get your $search word(s) into a regular expression OR | format - <?php $search = "php|web"; $string = "PHP is the web scripting language of choice"; $string = preg_replace("/($search)/i",'<b>\1</b>',$string); echo $string; ?>
  23. See the method used in this post - http://www.phpfreaks.com/forums/php-coding-help/retrive-from-mysql-by-date/msg1504124/#msg1504124
  24. Try using var_dump() instead of echo and do it on the line right before the if() statement.
  25. LOL And believe it or not, that doesn't generate any php error when trying to access $row['gender'] after doing that. $row['gender'] is returning $row[0], the first character of the dob string value that was copied to $row.
×
×
  • 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.