Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by PFMaBiSmAd

  1. Because the forum section where you posted this (PHP Applications, Frameworks and Libraries ยป Third Party PHP Scripts) has nothing to do with the problem. Moving thread to the PHP Help forum section...
  2. The size of the file exceeds that maximum post size setting - http://www.php.net/manual/en/ini.core.php#ini.post-max-size (you can find the link to this information in the upload handling section of the php manual.) Your code has no error checking logic in it to test if the upload worked before it starts testing values from the form. You actually need to test for an empty $_FILES array before you do anything. Then test $_FILES['image']['error'] before you start checking the file size, type, name... http://www.php.net/manual/en/features.file-upload.errors.php
  3. Add the following lines of code immediately after the opening <?php tag in the code you posted and tell us what it displays AFTER you submit your form - echo "<pre>"; echo "POST:"; print_r($_POST); echo "FILES:"; print_r($_FILES); echo "</pre>"; As to your enctype question - http://www.w3schools.com/TAGS/att_form_enctype.asp
  4. The example at that link works for me in the latest FF and IE browsers. If you are having a problem with the code, you would need to be way more specific about the symptoms or errors you are getting for anyone to be able to help you.
  5. If php is installed correctly, all you would need to do is remove the ; to uncomment the following line in the php.ini and stop and start the web server to get the change to take effect - ;extension=php_openssl.dll Confirm that the extension is actually loaded using a phpinfo() statement.
  6. Should work - $mailer->Host = 'smtp.gmail.com'; $mailer->Port = 465; You will also need the php OpenSSL extension enabled.
  7. Either the host name or the port that you used is not correct or your ISP or a firewall is blocking the port that you need to use. It would take seeing what you are using to be able to help you. As to the rest of the errors, set the timezone using one of the methods mentioned in the error message.
  8. Back-ticks are used when an identifier (database, table, or column name) requires special handling. In your case, show is a reserved keyword - http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html
  9. Add the following line of code before the first $db->execute() statement - $db->debug=true;
  10. The folders and files are present for me as well using 7-Zip
  11. If you were at the http://pear.php.net/package/DB page and could not find the download section with links for version 1.2 through 1.7.14RC1 files, I'm afraid we probably cannot help you.
  12. If the query successfully executes without error, it probably returns a result object. However, your query is failing. What database class are you using so that someone could try to determine what error checking and error reporting it has that could be used to find out why your query is failing? Edit: and are you trying this on a system with error_reporting set to E_ALL so that all php errors (not just fatal ones) would be reported?
  13. Aside from the fact that you are redirecting to the same page you are already on (why not just arrange the logic so that you fall-though to the rest of the code on the page), your current problem is because the following is assigning "true" to the session variable, it is not testing if the session variable is equal to "true" - if ($_SESSION['invalid']="true") { One = sign is an assignment operator. Two == signs is an equal comparison.
  14. You need to put an exit; statement after each of your header() redirect statements in order to stop the remainder of the code on the page from executing. What is the page name of the code you posted?
  15. It sounds like your page is being requested twice and you only see the output that occurs on the second request, which is no output because the unset() has cleared the variable. It would take seeing the whole code on the page that is not working and if that page is redirecting to another page, the code on that second page as well. Also, what browser are you testing with (and if it is FF, what debugger add-ons do you have installed) and are you doing any URL rewriting?
  16. No, you have not.
  17. You need to specify the HTML array index names (or numbers) so that you know which ones belong together - name='jobquote[328]' name="jobadminquote[328]"
  18. Without seeing your code, no one can possibly tell you why it is not working. The information about using the _x variable name works in all browsers.
  19. Only if you want to edit your code every time you change something. One of the points of using a database driven design (for form fields) is that the database holds the definition of the fields. This allows you to use the list of data from the database to dynamically generate the form, validate the expected form fields, and insert the results into a table. Is your question actually about generating the form, determining what data the form will send (what $_POST variables you will use), iterating through the data (edit: you should generally use some kind of loop to process sets of related of data values instead of duplicating code for each value), or defining/inserting the data into a table?
  20. Yes, your code is doing something wrong, but it would take seeing it to help you with which one(s) of the several different possibilities it is doing that could cause that symptom. Best guess is that you don't have any single-quotes around data values in the query (per the solutions given in your previous thread), so strings cause the query to fail due to sql syntax error, whereas numbers are getting converted to strings in the context that they are being used in the query and they work.
  21. Text based math questions are already being solved by one simple line of php code using eval() to parse the equation. Even trying to be clever and using the 'word' form of operators and numbers (plus, add, subtract, minus, times, one, two, three...) can be solved by using a simple array replace followed by an eval() statement. However, by outputting the math question as a word problem in a dynamically generated image (even if there is no background noise in the image) makes finding and solving the math question significantly harder (it is fairly easy to use OCR to find 4-6 letters/numbers in an image, but it is much harder to read and parse a complete sentence from an image.)
  22. If this data is in a database, it is usually much simpler to group the data the way you want in in the query and use aggregate group functions to get a count and sum of the items within each group.
  23. Or you could directly retrieve the value in your query the way you want it - http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format Zero lines of slow parsed, tokenized, interpreted php code are needed and the slow conversion into and out of a Unix timestamp can be avoided as well.
  24. The path you were originally specifying is relative to the currently running script, as already suggested that you confirm. By using a leading ../ you are specifying a starting path one level closer to the disk root than the current script (this may or may not be the domain root of the site.)
  25. How did you originally obtain php and install php? If you used the full .zip package, all of the .dll files would already be present and you would not need to be finding individual files. It also sounds like the php.ini that you are changing is not the one that php is using. If you used the .msi installer package, you are expected to enable extensions by going through the Windows control panel's add/remove item for php. If you used one of the WAMP all in one packages, you are expected to enable extensions by going through the control panel for that package.
×
×
  • 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.