Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. That's because the <li> elements have 16 pixels of padding on the left and only two pixels of padding on the right. You'll need to set some CSS to give equal padding to both sides of the list items containing the content you want centered.
  2. I believe that it will take the remaining width and divide it into equally sized pieces. In the case of "3*,2*,1*" there will be 6 pieces, three of them will be assigned to the left column, two of them to the middle column and the remaining one will be assigned to the right column.
  3. If the response is empty it probably means that PHP had an error. You should enable error reporting in your PHP. If you put these commands at the top of the PHP file it will display error messages: ini_set('display_errors', 1); error_reporting(E_ALL);
  4. I don't see any particular reason to call filter_input(). There's no security issue with any of the other methods.
  5. The server is not returning JSON, so the data type should be something else. What response is the server actually giving? Check the network tab of the browser's developer tools to see what the response is.
  6. Are you preventing the actual form from submitting? If you don't then it's going to reload the page and all Javascript will stop working. Try this code for testing: $('document').ready(function() { var form = $('#loginForm'); form.submit(function(event){ $.ajax({ type: 'POST', url: 'checkLogin.php', data: form.serialize(), dataType: 'json', success: function(response){ if(response == "login-success") { window.location.href = "dashboard.php"; } else { console.log(response); } }, error: function(request, status) { console.log("Error: " + status); } }); return false; }); });
  7. Check all the contents of $_POST and $_FILES to see if the data is there and where.
  8. Then you need to see what response contains. if(response == "login-success") { window.location.href = "dashboard.php"; } else { console.log(response); }
  9. So, what happens when you run that code? Did you have the Javascript console open to check for error messages?
  10. Ideally you would check for errors first, then move the uploaded file after as mentioned here http://w3schools.invisionzone.com/index.php?showtopic=55426#entry304332
  11. Have you seen what error code is actually being used? You can update the default message to show it: default: print 'Something unforeseen happened. Error code: ' . $_FILES['the_file']['error'];
  12. If that's a file, then it probably is in the $_FILES array instead of the $_POST array.
  13. The thing is that in this equation ( y = y1 + A sin [b (x - C)] + D ) y1 and D do the exact same thing, you can get rid of one of them.
  14. If only the user sees the page, does it make sense to have one URL for each user? Just having a single URL, like www.site.com/results, will be enough. On that page you would detect which user is logged in and display the correct information using a server-side language.
  15. You should do that with a server-side language. Whichever language you built the login system with. What happens if user 1 types www.site.com/user2 into his browser? Will it show him the results for user 2?
  16. You forgot a break; after case 6. You should put print '.</p>'; outside of the switch statement. If there's no temporary folder then you'll have to set up your server to provide PHP with a temporary folder for uploaded files.
  17. This equation you're presenting y = A sin [b (x - C)] + D is practically the same as the previous one, the only difference is that ωt is represented as x and a phase shift "C" has been added. Your parameter "y1" is actually the same thing as "D" in that equation, so nothing has changed. I don't think a phase shift would make any noticeable difference, it just changes the starting value of x. Formally, the phase shift parameter is represented like this: A*sin(ωt + φ) + k Where φ is the starting angle in radians. 90 (half pi radians) degrees would mean starting at the top, 180 degrees (pi radians) would mean starting at the center and moving in the opposite direction as 0.
  18. You should read the documentation of any function before using it. Here's the documentation for $.post(): http://api.jquery.com/jquery.post/ You can see the documentation for all the other functions here: http://api.jquery.com/
  19. You have set the data type to "jsonp". If it's not proper JSON it won't be interpreted properly. You should set the data type to "text" or "html" if the JSON.
  20. Check the response body in the network tab.
  21. It was an old program by Microsoft that made web pages for you in plain HTML. It used a visual editor, so you didn't need to write code. It created messy invalid HTML that only worked properly in Internet Explorer.
  22. It's mentioned in the HTML tutorial: http://www.w3schools.com/html/html_iframe.asp I recommend against using frames.
  23. If the link is inside a frame, then the link will open in the page that contains that frame.
  24. I think there might be something wrong with your database design if you need a field for every number from 1 to 25.
  25. Like I said, prepend a slash to the path to make it relative to the site root. <script src="/Appointments/Frontend/js/jquery-1.11.1.min.js"></script>
×
×
  • Create New...