Jump to content

Funce

Moderator
  • Posts

    602
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by Funce

  1. This is because " " is not an empty string, and therefore passes your validation.
  2. Page 1 and Page 2 work like standard webpages. The request is sent from the browser, the server responds with a response fitting the request. In Page 1, you request the first page, and you get a form back. (As its HTML) In Page 2, you request it with parameters like name and age, and the server processes any ASP on the page, and then responds with a modified HTML file. Once the server has sent the output to the browser, the server has finished its part, and actually isn't running any pages.
  3. Probably more closer to the answer, is that there's two lots of $x++ in the loop in the second example. So you're incrementing by two each time.
  4. The 'continue' keyword in this case, is actually referring to the while loop its inside. The 'continue' indicates that you finish the current loop of the while, and continue onto the next. The reason why the numbers are skipped, is because the loop is 'continued' before the output is sent.
  5. Funce

    PayFast

    Hey there Cooley, Have you had a look at PayFast's documentation on signature generation? It looks like the passphrase is set under the settings page of PayFast.
  6. Funce

    HELP with JOIN

    I'm feeling a more design issue is afoot here. Why do you need the extras removed?
  7. Funce

    Aahi

    If you wished to do this, you'd need to explicitly write out all the columns you wished to output, rather than using the * wildcard. SELECT Projectex, ...
  8. Hi Victor! Just a quick note that .html files, by default, don't run any PHP inside them. You'll need to change that file to contacto.php for the PHP processor to recognise that PHP code is needed to be run.
  9. Hi Antonio Your update function only gets defined once the page has loaded. You're calling update before its fully loaded. If you want to call it immediately, put the update() right after the function definition.
  10. You've redeclared your i variable inside your if statement. The i++ is incrementing that i rather than the i that's being outputted.
  11. Funce

    python

    What's important with these operators, is that they perform Binary Arithmetic. So to understand it, you need to understand X and Y in Binary. X (101)= 5 Y (011) = 3 ^= Is the python bitwise XOR operator, and the result of XORing X and Y is the following X ^= Y (XOR) (110) = 6 Similarly |= is the Bitwise OR operator, and so X |= Y (OR) (111) = 7 And &= is the bitwise AND opereator, and so X &= Y (AND) (001) = 1 Each operation is applied to each digit in sequence.
  12. Take a look at our Media Query Tutorial page. Let me know if you have any questions about it.
  13. You might have some conflicting styles in there. Can you paste your stylesheet in a code block?
  14. Node's mysql module doesn't support Mysql server 8 authentication just yet. So we need to change the server so that it uses the old version of auth. If you can execute an SQL query (not in node), then you can run the following ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password' Replacing, 'password' with your own password of choice. (Assuming you're still user root on localhost domain.) Then run flush privileges; And try node after that.
  15. Could you include the stylesheet with this? I'm not able to recreate the issue with what you've shown.
  16. Try using z-index for this one. Higher numbers go on top of lower ones.
  17. Give "MySQL Community Server" a try, and you'll be able to choose your OS after that.
  18. You could try inspecting the element in your browser and see what styles are applied to it. Might be some margins applied that you can't see.
  19. Hey there, its all technically possible, and there are many solutions out there for merging technologies. If you can activate MySQL on its own, without any other webserver running, I don't believe it would be any different from accessing any other MySQL Database inside Node. I'm pretty sure Node won't know the difference either.
  20. So does your Database have the values 'Grognak', 'White', 'Ice Blue', 'Strength', and 'Charisma' in it? If it does, your script is currently working the way its written. Your SQL query will need adjusted to include the variables rather than those hard coded strings, you've put in. You might be interested in something called "Prepared Statements" for safe passing of data. Here's one of my examples I like to use: <?php //This line is for highlighting on the forum, just make sure the code below is inside a php block //PREPARED STATEMENTS - FUNCE //INSERT EXAMPLE $string_var = "String"; $double_var = 3.5; $int_var = 45 $sql = "INSERT INTO table (column1, column2, column3) VALUES (?, ?, ?)"; $stmt = mysqli_prepare($link, $sql); mysqli_stmt_bind_param($stmt, "sdi", $string_var, $double_var, $int_var); mysqli_stmt_execute($stmt); mysqli_stmt_close($stmt); Here's the Documentation on what I've used (Procedural Style is the one you want to look at) mysqli_prepare mysqli_stmt_bind_param <- The important one mysqli_stmt_execute mysqli_stmt_close
  21. If you use position:relative on the div that holds the image, then you can then use position: absolute on the Price and the status and use the combination of the bottom, left and right styles. Take a look at the CSS positioning tutorial for more information.
  22. Funce

    Tab Menu

    You've lost some code to the automatic forum formatter. Please edit your post to use the code block feature.
  23. Oh! I tried looking at this quite in depth. Prepared an answer, wanted to think on it a bit more, because that should be false. Went and got a coffee. And now: You're using a single = (assignment) instead of the == (loose equality) or even === (strict equality). Do you find that when you run it, it actually turns the cell blue?
  24. Funce

    html links

    The HTML exercises naturally cross into CSS. The specific tutorial for reference is: https://www.w3schools.com/css/css_link.asp
  25. You might do, although you may want to look up terms you're unfamiliar with. If you have any further questions about it, you're always free to ask here.
×
×
  • Create New...