Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Ingolme last won the day on May 27

Ingolme had the most liked content!

Community Reputation

1,002 Excellent

Previous Fields

  • Languages
    Java, PHP, MySQL, Javascript, CSS, HTML

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Interests
    Web development, drawing, videogames, foxes.

Recent Profile Visitors

187,303 profile views
  1. That's not the correct syntax for an UPDATE query. The correct syntax is: (https://www.w3schools.com/php/php_mysql_update.asp) UPDATE table_name SET column1=value, column2=value2,... WHERE some_column=some_value
  2. What error are you getting and what does your new code look like?
  3. You have to determine why it did not work and then solve that problem.
  4. That code looks valid, but it is different than the code you posted in this topic. It is an INSERT query, so it will only ever create new records and not change existing ones.
  5. Look carefully for differences between your SQL and the SQL Syntax shown in this tutorial page: https://www.w3schools.com/php/php_mysql_insert.asp
  6. It's best you go through the MySQL section of the PHP tutorial and learn how to do it. You won't learn if you don't go through the effort and next time you run into a problem you'll just be asking other people to write the code for you again.
  7. You're mixing object-oriented mysqli with procedural mysql and your INSERT query is missing the VALUES section.
  8. Without seeing your code I can't tell what's wrong but it looks like you're probably mixing up the procedural and object-oriented versions of the functions.
  9. Use mysqli_error() to find out what went wrong with the query. It looks like you forgot to add a VALUES() section to your INSERT query.
  10. Ingolme

    Character Encoding

    I'm not sure what an ERP is, but it seems to be storing data with the wrong encoding in the database. The only solution is to detect the encoding of the string and convert it after retrieving it from the database, as you were trying earlier. If utf8_encode() is not working, it means that the encoding is probably not ISO-8859-1. I don't think I can help much if mb_detect_encoding() is not working. You will have to find out why the function is not available.
  11. If you don't have a unique key, it won't find a duplicate, so it will not update any of the records and it will create a new one instead. After adding the ON DUPLICATE KEY UPDATE section to your query, the code now has 8 "%s" placeholders, but you are only passing in four values to the sprintf() function.
  12. You will need to specify a unique key in your table. Which of those fields has to be unique?
  13. Ingolme

    Character Encoding

    If your HTML document has the encoding set to UTF-8 using a <meta> tag and your PHP files are UTF-8 encoded, any form data should automatically be converted to UTF-8 no matter what the user pastes in. If you have a database connection, make sure that the encoding of the connection is UTF-8 as well.
  14. An INSERT query always creates a new record. If you want to update a record, you need to use an UPDATE query.
  15. Ingolme


    If they're telling you to just use Wordpress, I would hardly call them professionals. The first step, before applying media queries, is to make everything flexible. Don't give fixed widths to anything. For example, the header, section and footer you can set max-width instead of width: #header, section, footer { max-width: 1080px; } The site content and side bar need to be replaced with percentage values: #sitecontent.sitecontentleft { width: 72.22%; } #sidebar.sidebarright-index { width: 25%; } The media queries will only be necessary once things get too small to nicely fit two columns. You choose a breakpoint by eye based on when you think it stops looking good. At the breakpoint, you would stack things vertically. The easiest way to do that would be to remove all float declarations and set the width to auto. @media screen and (max-width: 800px) { #sitecontent.sitecontentleft, #sidebar.sidebarright-index { float: none; width: auto; } } The media query must go after all the other rules in order to be able to override them.
  • Create New...