Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by PFMaBiSmAd

  1. Php code shouldn't produce any type of error, warning, or notice during its normal execution. Only for abnormal things like a legitimate visitor doing something that your code didn't take into account or a hacker trying to break into your script. Is there some reason you haven't corrected each problem that is producing an error? And you do realize that the display or logging of each error is only that last step in php's error response code. Php must still detect and handle each error as it occurs and it probably takes 10-20 times longer to execute each statement that produces an error than it would take if you corrected the problem causing the error.
  2. You have a much more serious problem than finding a database management tool that can do this. You should not be creating separate tables for each new piece of information.
  3. Which field(s) does your code indicate are empty, because other than a Unknown column 'height_above' in 'field list' error (edit: due to me not having your database where I tested) from your query, the code you posted attempted form and execute the INSERT query when I tried it.
  4. Please don't suggest doing that. Doing so will also hide information about real problems, such as a legitimate visitor doing something that your code didn't take into account or a hacker trying to break into your script. Error_reporting should always be set to at least E_ALL. Code should not generate any type of errors, warnings, or notices during its normal execution. Only for unexpected things and a $_GET index not being set is not an unexpected thing.
  5. Allowing a value from the visitor to directly determine which function to call, without any validation of the value, is very dangerous.
  6. If you have a OOP class that was written for php5, there are likely a ton of things it is doing that are not compatible with php4. The workaround would be to not use php4, because the end of life and end of support for it was over 4 year ago.
  7. If you remove the () from around the outside of your php string (they are unnecessary), it would make it easier to see what your actual sql syntax is.
  8. The public keyword is specific to php5 OOP syntax and produces that error when used on php4. Your web host should have provided a way of upgrading your account to the latest php5 version, because the end of life and end of support for php4 was over 4 years ago.
  9. You still using php4, but trying to use php5 OOP syntax. Time to upgrade your php version, because the end of life of php4 was over 4 years ago.
  10. If you output the $query variable as part of your error checking/error reporting logic, you can probably see what is causing the problem. While it probably doesn't have anything to do with the error, in your first query, NOW() should not be enclosed by single-quotes as that makes it a string made up of the characters 'N O W ( )' and not the mysql function NOW(). Also, NOW() returns a datatime value. I suspect you wanted to use CURDATE() (just the date.) You are also not using the result from the first query. In your second query, NULL should not be enclosed by single-quotes as that makes it a string made up of the characters 'N U L L' and not the mysql keyword NULL.
  11. Php produced web pages should be laid out as follows - <?php // php code that determines what the page is going to do, if you are going to stay on the page or redirect, and what content is going to be on the page (php produced content is simply built in php variables) ?> <!DOCTYPE .... <body> html.... <?php echo $some_php_produced_content here...; ?> html.... <?php echo $some_other_php_produced_content_here...; ?> html... </body> </html>
  12. Joomla has minimal requirements - http://www.joomla.org/technical-requirements.html
  13. Just because paypal redirects the visitor back to your site (or the visitor directly browses to pages on your site), does not mean that the payment was successful and completed. You should read the paypal documentation for Payment Data Transfer (PDT) and Instant Payment Notification (IPN). You would only consider items as being purchased if the transaction is successful.
  14. In case you missed seeing it, there is a 'topic solved' button at the lower left-hand of the page. I got it for you this time.
  15. I don't see any use of the ->stmt_init(); method to create either $login_statement or $test_stmt. Ref: http://us3.php.net/manual/en/mysqli-stmt.prepare.php
  16. From the mysql_query documentation -
  17. All string data that is put into a query needs to be escaped. See this link - mysql_real_escape_string
  18. You would use output buffering (ob_start) and let imagepng() send the output to the buffer. Then use ob_get_contents to get the image data into a string.
  19. You have to put the correct username and password for your database into the following two lines - $username=""; // Mysql username $password=""; // Mysql password
  20. Echo, because I like to use comma separated arguments, which also allows the Ternary operator to be used in the statement. Works as expected - echo 'some text ', isset($var) ? 'set' : 'not set', ' more text'; Doesn't work as expected - print 'some text ' . isset($var) ? 'set' : 'not set' . ' more text';
  21. Joomla is not dependent on the operating system and in fact you can download Joomla from the easyphp site - http://www.easyphp.org/modules.php Best guess is the username/password you entered either isn't assigned to a database/the database doesn't exist at all or you entered the wrong username/password.
  22. Php is a server side scripting language. Unless your php code is inside of a file that is parsed as a php code file on the server, the php code in it won't be executed.
  23. Is your form a .php page that would be parsed by the php language when it gets requested? Are you browsing to the URL of the page (http://localhost/form.php) or to it as a local file in your browser?
×
×
  • 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.