Jump to content

dannon

Members
  • Posts

    70
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

dannon's Achievements

Member

Member (2/5)

2

Reputation

  1. Also Doesn't look like line 21.
  2. Well, I get no parse errors when I test your code. Make sure that you end all of your statements correctly and make sure that you have your curly braces placed in correct places. Make sure that all of your syntax is correct. Based on what you have posted, I cannot see what is wrong with your code. I should mention that I have replaced the post values in my test to: $departement = 'Informations'; $nom = 5; $courriel = 4; $telephone = 7; $message = 4;
  3. I believe your error states that it has found an unexpected '}'. You might have to many '}' somewhere. The code that you have posted doesn't give me any errors.
  4. http://lmgtfy.com/?q=comment+box+tutorial+php
  5. You could store the IPs in database and make the IP column unique.
  6. This is a help forum, not a teaching forum. I doubt that any of the people who regularly help here are tutors.
  7. Thank you! I have created this query: SELECT @count := COUNT(*) AS "count", @min := MIN(id) AS "min" FROM `items` WHERE item_id = 5; DELETE FROM `items` WHERE @count > 5 AND id = @min; Is there a way to make it better?
  8. How can I make it so that if there are more than 5 foreign ID's exist in the table, and every time a new foreign ID is inserted, the 6th oldest row gets removed, so I can limit how many rows of the same foreign ID can exist in the database?
  9. I'm going to make it so it checks the last 5 cookie tokens from the database instead of the last cookie. Is it possible to make sure that only 5 tokens of 1 user_id exists in the database? Could someone help me rewrite a query for this?
  10. I have found that if I remove the PHPSESSID cookie and spam click on a link, the cookie breaks. Has this been causing the issue all along? Are there too many requests sent while the session isn't properly set or something? and the cookie isn't set on the client, while the website thinks it's updated? If so, is it possible to fix this?
  11. Yea, I put a dot before the domain for all of my cookies now, I use this: where DOMAIN, is set to my website's domain name (example.com). $domain = ($_SERVER['HTTP_HOST'] == "localhost." ? false : "." . DOMAIN); I have made it so my .htaccess redirects to the URL without the "www.". I have also made sure that my website only redirects to URLs without a www. It still breaks.
  12. Bumping for justice! Should I post my website on GitHub and post the URL here? Or my whole site isn't needed?
  13. Ah, that's fine. What do you mean by real data? What kind of data do you need?
  14. php_flag display_errors on php_value error_reporting 9999 RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.+)$ index.php?url=$1 [QSA,L] I make it so the url is like this: example.com/controller/controller_function
  15. Based on my testing, I'm guessing that if(ob_get_length()) ob_clean(); will make sure that only the error gets outputted. Here's my test: <?php set_error_handler('errorHandler', E_ALL); echo "test"; throw Exception; function errorHandler($number, $message, $file, $line) { if (ob_get_length()) ob_clean(); $errorMessage = 'Error: ' . $number . '</br>' . 'Message: ' . $message . '</br>' . 'File: ' . $message . '</br>' . 'Line: ' . $message; echo $errorMessage; } ?>
×
×
  • 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.