Jump to content


  • Content count

  • Joined

  • Last visited

Everything posted by Ingolme

  1. using OR in MySQLi

    It will function without throwing any errors, but I can't tell you if it meets your requirements because I don't know what your requirements are. I would recommend that you run the code for yourself, testing it with different values, and see whether it gives you the results you want it to.
  2. using OR in MySQLi

    No, that won't work. You have four placeholders but only three values.
  3. using OR in MySQLi

    This is how the OR operator is used in SQL: $stmt = $conn->prepare("SELECT id, user, title, date, show_post FROM post WHERE show_post = ? OR show_post = ? ORDER BY id DESC"); $stmt->bind_param("ss", $Db1, $Db2);
  4. Advice Needed for Basic, Simple PHP Mail Script

    The mail() function works with line breaks. Just put a line break in the message that you're sending. It will take a day or two for a domain name to be assigned to an IP address. That's not an issue, that's just the nature of the internet. It takes time for the millions of DNS servers across the world to update their records when a domain name has been assigned to a new IP address.
  5. Advice Needed for Basic, Simple PHP Mail Script

    If your web host has sendmail enabled, the simplest way to send e-mails is to use the mail() function. All you need to do is pass a few strings into one function to use it. It is very primitive and doing things like attaching files or sending formatted e-mails is difficult. The PHPMailer library is much more flexible and has many more features. It requires more code to start off, but overall it makes attaching files, sending mail through an SMTP server and formatting mail with HTML much simpler than with the mail() function.
  6. Using document.cookie

    The document.cookie property is just a long string with all the cookies and their properties in it. The only way to get a cookie out of it is using string manipulation functions to get the pieces of the string that you need. There is no easier way to do it. If you use the localStorage API instead of cookies you'll have an easier time. Here's a page describing how to use the localStorage API: https://www.w3schools.com/jsref/prop_win_localstorage.asp
  7. class attribute selector for autocomplete field

    It is an attribute, so the usual attribute selector will work.
  8. user login verification + condition

    What you had before would have worked if you had added the `title` field to your select statement. You've replaced it with $row[6] which is probably not going to work.
  9. By omitting the action attribute the form submits to the same page.
  10. class attribute selector for autocomplete field

    When you use jQuery and its plugins they often put additional classes on the elements. See if any of the class methods in jQuery help solve your problem, if not then you probably should use data attributes instead of the class attribute to store data. Here's how data attributes are defined: <element data-something="value1" data-somethingelse="value2"> In jQuery you can access the value of data attributes using the data() method: http://api.jquery.com/data/#data-key
  11. unknown jquery code model

    If you have the rest of the source code from that page you should be able to see which libraries are being included. It is either a jQuery plugin or not jQuery at all.
  12. user login verification + condition

    You did not select "title" from the database in your query.
  13. Error 500 - Probable Causes

    It would appear PHP is not printing any of the error messages. You're going to have to either find a way to enable error logging on the server or go through the procedure of cutting out code until it starts giving a useful response.
  14. user login verification + condition

    The first thing you should do is try the code yourself to see if it works. I don't see any obvious errors, so I would guess that it does work, but is unsafe on a few levels. I've removed the database information from your post to keep your accounts safe from people reading the forum. Your SQL query is open to SQL injection. Read about prepared statements to keep your database safe from hackers.nencrypted The passwords are openly visible in the database. It is unsafe for the people signing up to your site because you, and anybody with access to your database, know their passwords and you can use that to hack their accounts on other websites since many people use the same password in multiple places. To solve the password issue, you hash the passwords before storing them into your database using password_hash(). When searching for a user, you have to search by username first, pull out a hashed password and compare it to the data that was sent in the form using password_verify().
  15. running ajax only once inside a for loop

    The asynchronous nature of AJAX means that the code inside the done() and fail() methods only begin running long after the loop ended. Given your current code structure, the easiest way to solve it would be to keep track of whether it was sent already in a global variable. The following code will only work if the noticeSent variable is in the global scope. First define the global variable outside of the loop. var i; var noticeSent = false; for (i=0; i< feeid.length; i++) { When an AJAX response is returned, check the noticeSent variable and only send the notice if it hasn't already been sent: if (sendnotice == "Y" && !noticeSent) { noticeSent = true;
  16. Error 500 - Probable Causes

    I'm not asking you to look at the error console. Look at the network tab. It will have a whole lot of information in it whether or not the request failed. It has the HTTP method, the HTTP status code, the request headers, the request body, the response headers and the response body and it even provides information as to how long the request took to send, process and return from the server. Please show all the information that the network tab provides about the request. I've attached an image showing you what the network tab should look like in your browser:
  17. Error 500 - Probable Causes

    You can't put the console.log() in the success function, because a 500 is a failure. This is why you should monitor the AJAX request in the browser's developer tools.
  18. Error 500 - Probable Causes

    Is there anything in the AJAX response? If it's empty, the only thing left to do is keep stripping out parts of the PHP code until it stops returning 500.
  19. Simple Transition

    You can use the CSS animation property for that. Unlike the transition property, the animation property does not need the element to have multiple states.
  20. Error 500 - Probable Causes

    What is the output when the code runs? If you're using AJAX to run the PHP, then you will be able to see the output in the response body of the request in the network tab of the browser development tools.
  21. A question i still am looking for an answer

    There is no zoom feature in CSS, you have to create it yourself based on your understanding what zooming actually is. What does it mean to "zoom in" or "zoom out" on something? When you zoom in, what you actually do is make the object larger. In the same way, when you zoom out you are making the object smaller. This means that to make something "zoom" all you have to do is change its size. In CSS use can use the transform property to change the size of an object, you can also use the width and height properties. All of these properties can be used with CSS animation.
  22. using where clause with date not working

    What happens when you run the query? Do you get zero rows or is there an error occurring? My first guess is that there are no rows with workDate = '2017-12-05' To begin debugging this, make sure that PHP is catching the errors and printing them, then check the database for yourself to see if there are actually rows that match your search criteria.
  23. Add scrollbar left menu for Safari too

    I am not going to angrily reply to people telling them that this is the wrong place, because it is not the wrong place. The fact that the staff stopped coming to the forums doesn't mean the suggestions forum isn't a place to put suggestions. When somebody comes here with a suggestion I will kindly inform them that the staff rarely visits the forum and I will point them to a place where their feedback is more likely to be heard.
  24. Simulating a Button Click with the Enter Key

    Step 1 is complete. We have verified that clicking the button does not fire the form submit event. Now we have to find out why. Keeping the code the same as in my previous post, verify that you are using <input type="submit"> and not <input type="button">. If you're using "button" then change it to "submit" and test again. If that was not the issue, the next step is to make sure that you have no form validation attributes. Attributes like "required" will prevent the form from submitting. If the issue is still occurring after that then reply here with your form's HTML structure and the small block of code that handles the form's events and we can move on from there.
  25. You have to use a programming language to loop through database records and generate options. HTML is completely unaware of what happens on the server.