Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by Funce

  1. 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.

  2. 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
    $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);

    Here's the Documentation on what I've used (Procedural Style is the one you want to look at)

  3. 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?

  4. Just now, MyLifeForIre said:

    im running the code from my webpage. so my local machine is the webserver? i guess im not sure

    Webservers require specific set up, so you'd know if you had one.

    You'll need a webserver to run PHP code. I recommend XAMPP to test locally as its essentially install and run. Make sure you put your files into its 'htdocs' folder, and you should be good to test. Access via 'localhost'

  5. Hey there, if you want to code a backend for your contact form, you might have some luck looking at this: https://www.w3schools.com/php/php_forms.asp

    This is the function you'd want to use to send an email: https://www.w3schools.com/php/func_mail_mail.asp

    Onto your second question. Sell t-shirts and take online payments?

    • You'd want a payment processor. I'm personally familiar with Stripe and its really good for getting a checkout nice and quickly.
    • Unless you have less than 10 items, you'd probably want your own Database. This will have all the details of your shirts, including images, categories, etc Good for customers and for your payment processor. Manual upkeep of a page for each product gets tedious fast.

    Above is the bare minimum. You could look at a couple of other things afterwards (like logins, and accounts) but sticking with the above will get you up the fastest.

  • Create New...