-
Posts
16,734 -
Joined
-
Last visited
-
Days Won
9
Everything posted by PFMaBiSmAd
-
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.
-
MySql Client That Doesn't Load A List of Tables
PFMaBiSmAd replied to cmiddlebrook's topic in MySQL Help
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. -
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.
-
Allowing a value from the visitor to directly determine which function to call, without any validation of the value, is very dangerous.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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>
-
Joomla has minimal requirements - http://www.joomla.org/technical-requirements.html
-
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.
-
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.
-
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
-
One UPDATE line works, multiple lines won't.
PFMaBiSmAd replied to sergiozambrano's topic in MySQL Help
From the mysql_query documentation - -
creating a string for base64 from in memory image?
PFMaBiSmAd replied to MrUmunhum's topic in PHP Coding Help
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. -
You have to put the correct username and password for your database into the following two lines - $username=""; // Mysql username $password=""; // Mysql password
-
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';
-
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.
-
input in form returns a string instead of php function
PFMaBiSmAd replied to PHPSuperNewb's topic in PHP Coding Help
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. -
input in form returns a string instead of php function
PFMaBiSmAd replied to PHPSuperNewb's topic in PHP Coding Help
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?