Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Funce

  1. Funce

    Table has error

    I wouldn't have an answer for why that is. Have you read further? Is it a chapter on error checking? I know some examples in books do that on purpose to teach the value of debugging errors. I have a C# book that did just that.
  2. Funce

    Table has error

    I didn't read it too thoroughly. It might've been a transcription error. CREATE TABLE IF NOT EXISTS forum( post_id INT UNSIGNED NOT NULL AUTO_INCREMENT, first_name VARCHAR(20) NOT NULL, last_name VARCHAR(40) NOT NULL, subject VARCHAR(60) NOT NULL, message TEXT NOT NULL, post_date DATETIME NOT NULL, PRIMARY KEY (post_id) ) Try this. It doesn't have multiple `first_name` columns.
  3. Funce

    Table has error

    Where are you pasting this code? That error doesn't look like a PHP error. (Which I'm assuming that is being written in) If you've pasted that in directly to phpMyAdmin for instance, you'll need to try something like this instead. Please let me know how it goes! CREATE TABLE IF NOT EXISTS forum( post_id INT UNSIGNED NOT NULL AUTO_INCREMENT, first_name VARCHAR(20) NOT NULL, last_name VARCHAR(40) NOT NULL, first_name VARCHAR(20) NOT NULL, subject VARCHAR(60) NOT NULL, message TEXT NOT NULL, post_date DATETIME NOT NULL, PRIMARY KEY (post_id) )
  4. I'm hoping this is a snippet, I couldn't get this to run originally, but you said you could so no matter. Try adding a value to the Select Option, and then check if that is the option currently selected. <select id='opt2' name='USUnits' onchange="showForm1()"> <option value="">Select Option</option> <option value="0">Lbs/Sec</option> <option value="1">Lbs/min</option> </select> Then it would be as simple as var v = document.forms["myForm"]["USUnits"].value; if (v == "") { alert("SMass flow unit selection must be selected"); return false; } I highly recommend you use more descriptive variable and field names. It was a little hard impossible to follow the jq, jjq, jqq, ojq, and what they meant without checking the definitions of them.
  5. I'm not sure very many browsers have the capacity to run JavaScript inside CSS. Does this otherwise work with any verbose commands like Alert or Console.Log? <script> tags have no meaning inside <style> tags. Not to mention that the 'JavaScript' you have written is of totally the wrong format. What are you attempting to achieve here?
  6. Does your Zapier have any logging systems? If so, is there any difference in logging results between using local and using the server? Are you expecting a different result? Are you supposed to redirect to a separate page? Does your webhook activate at all?
  7. I've had a look through and its the variations on handling between `color`, `text-shadow` and `background-clip` I noticed that some browsers handle their styling groupings differently. Its illustrated clearly with the discrepancy between Chrome, Edge, and Internet Explorer. Internet Explorer doesn't obey `background-clip: text`. Hence you can't see the text at all. Take a peek at https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip to check for compatibility. Edge groups its opacity for its `text-shadow` with that of its normal `color` hence when you use `transparent` it makes the shadow transparent also. It does however obey `background-clip` so you can still see the text. Chrome seems to keep all of them separate with none affecting the others. If you wish to support these browsers you might want to look into browser specific styling.
  8. It looks like to me you're missing a `float: none;` for that section that you're referring to. The specific spot you're looking for is gc_template.css - Line 112 #middle { width: auto; width: -moz-auto; margin-left: 0px; float: none; /* Add this */ } From my end, this looks like it works. Feel free to let me know if it does not. This section, in particular, was escaping the page wrapper, making me think there was some alignment or flex going on. I was not incorrect.
  9. Can confirm, your issue stems from using `mysqli_real_escape_string`. That function just half-protects your queries from any anomalous characters, by escaping them, that may end up executing unwanted things. Not particularly useful in any case. Any special characters inside that function are taken literally `\r\n` rather than as they're supposed to be which is a Carriage Return and LineFeed Character. (Basically new line) In this case you won't even need to use mysqli_real_escape_string. You're not putting the data into the database are you? If you are I suggest reading up on 'Prepared Statements'.
  10. Here is the documentation on Javascript Sessions. https://www.w3schools.com/jsref/prop_win_sessionstorage.asp Its stored under 'Window' in your link.
  11. If you've already managed to pull the RSS feed, and you know WHERE to get this XML from on your local file system(or otherwise), what you want is to find out how Python can parse XML strings/files for you. Just note that the inbuilt abilities of python are vulnerable to maliciously constructed XML so I recommend checking some of these out. For Python3: https://docs.python.org/3/library/xml.html https://pypi.org/project/defusedxml/ You seem pretty onto things, so don't hesitate to ask questions. There are loads of knowledgeable people here. Welcome to the W3Schools Forum!
  12. Funce


    That's cool! I suggest checking out the HTML tutorial here: https://www.w3schools.com/html/default.asp You can find nearly everything there, but it should be a good thing to start with.
  13. This may be for a large number of reasons. Do you have any examples for us to look at?
  14. Indeed Roddy, That sounds about right. And then defining cat. I get what you mean in regards to languages! I guess I'm more cursing my forgetfulness than the language itself. Thank you for the insight.
  15. May I recommend using the code block ability of the Forums. It'll be able to colour and structure your code to be a whole lot more readable. -- If you want to add 'More box' in regards to filling the rest of the page, you'll need to change the styling for it to do so. Try experimenting with height. You might be able to get somewhere with that. If you want to add ANOTHER box underneath that navigation box, put the HTML code for another box in underneath the nav box, then surround both boxes in a <div> tag. I've copied the navigation box again for this example.
  16. Which website would you be referring to? The Forums, or W3Schools website? Do you have a screenshot? Perhaps we can identify where you're going wrong through that.
  17. The new expression produces an object using a Constructor function already defined (In this case, Chart). So if your second example works, it has to be defined elsewhere. (Hence I also wanted to make sure that the console was clear before attempting the second example) Are there any scripts that run on the page you're loading? Perhaps it's loaded there. Derp, Javascript is classless. Curse the PHP familiarity in syntax!
  18. I would think that this would depend on what scope you were using it in. Is this run on a webpage? If so... Is Chart.js included in your page? That would bring in all the class definitions so you wouldn't need to 'require'. You stated that this was in your browser console. Did you refresh the page to clear the console of imported modules after your first test?
  19. Funce

    Asynchronous PHP calls

    Yeap! You would be correct. I've now managed to get this to work. I'm instead using stream_socket_client in place of fsockopen. My local server doesn't have a proper certificate installed, so I've just currently made it ignore SSL verification. Thank you for the insight.
  20. Funce

    Asynchronous PHP calls

    I'm running into a few issues regarding my web application written in PHP. I'm wanting to post some data (already collected) without waiting for a response. I know that the page this posts to will take forever and a half to get through because it has to send multiple emails through a server that takes forever to do one. So I definitely do not want to block this page whilst the script is running. I looked around and I found this function, but I'm having some issues with it. <?php function post_without_wait($url, $params) { foreach ($params as $key => &$val) { if (is_array($val)) $val = implode(',', $val); $post_params[] = $key . '=' . urlencode($val); } $post_string = implode('&', $post_params); $parts = parse_url($url); $fp = fsockopen( $parts['host'], isset($parts['port']) ? $parts['port'] : 443, $errno, $errstr, 30 ); if (!$fp) { throw new Exception($errno . ' - ' . $errstr); } $out = "POST " . $parts['path'] . " HTTP/1.1\r\n"; $out .= "Host: " . $parts['host'] . "\r\n"; $out .= "Content-Type: application/x-www-form-urlencoded\r\n"; $out .= "Content-Length: " . strlen($post_string) . "\r\n"; $out .= "Connection: Close\r\n\r\n"; if (isset($post_string)) $out .= $post_string; fwrite($fp, $out); fclose($fp); } ?> Whenever I use this, using my URL and the whole $_POST array, I get HTTP/1.1 400 Bad Request Date: Fri, 31 Aug 2018 01:04:56 GMT Server: Apache/2.4.33 (Win32) OpenSSL/1.1.0h PHP/7.2.5 Vary: accept-language,accept-charset Accept-Ranges: bytes Connection: close Content-Type: text/html; charset=utf-8 Content-Language: en Expires: Fri, 31 Aug 2018 01:04:56 GMT I can confirm that the page it is posting to never even runs, as I've set up an exception that is not being caught by my debugging tools. I'm using port 443 as it is my SSL port I'm running on. Port 80 gives me a 301 permanent redirect (I only want HTTPS, this is sensitive anyway). Does anything look amiss with the creation of this request?
  21. The width still is 25%, 25% of its parent container. Just like before. Its just now the navigation is above the main content. Look at the Blue box in my pictures to see how big the flexbox is.
  22. Let's compare! The blue area shows the container that your text is being centred off of. The orange area represents your margins. Compare it with this And you can see the difference
  23. No worries Barton. Your container was off to the left. So your text (centred on the container) was off to the left as well. The margins just created equal spacing on both sides of the container which ends up centring the container and fixing the issue.
  24. Thanks, John. I tend to only come here at the end of my workday when I've reached my wit's end with my own programs. Because of my TimeZone, sometimes it gets a little interesting, timewise. I wish I could've saved you the trouble, but I'm glad its solved now.
  25. Hi there Roddy, I tested using Chrome (In its mobile emulation form) and using Chrome on my Samsung S9+. From what I remember from my cursory observation yesterday (or earlier today) one of your scripts, though I cannot remember which, was importing a new stylesheet which applied styles to your #middle element. The styles were never unapplied or otherwise overridden elsewhere. That would be the main issue for the colour changing. Have you seen the Jquery function AddClass? It's pretty helpful when you want to apply predefined CSS styles through Javascript. https://api.jquery.com/addclass/ https://api.jquery.com/removeclass/ I was unable to click on the links today to test, your overview.js has an error at line 423. You've commented out the beginning of a multiline comment block.
  • Create New...