Jump to content

Sigmahokies

Members
  • Content Count

    52
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Sigmahokies

  • Rank
    Newbie
  1. Sigmahokies

    RSA encryption

    So, do I have to find source, then download it, then put in path to connect to this script?
  2. Sigmahokies

    RSA encryption

    Hello everyone, I'm trying to create a RSA encryption, but seem it is not function correctly. Is Javascript know RSA? like, let rsa = new RSA(); do I have to download from github? here my code: let rsa = new RSA(); let prime = ["2", "3", "5", "7", "11", "13"] //<-- Prime number let random = prime[Math.floor(Math.random() * prime.length)]; let text = document.getElementById("readed"); document.getElementById("en").innerHTML = rsa.encrypt(random, text); Seem console log show it is not function.
  3. Sigmahokies

    JavaScript and PHP same time

    Never mind, i found a way to post, Javascript and PHP can use one keyword, but work in separate.
  4. Sigmahokies

    JavaScript and PHP same time

    Hi Justsomeguy, Ok here my code, I replaced array ([ ]) to nothing in PHP, so PHP should able to get data from this name. <tr><td>Go/Walk-To/From</td> <td><label for="box"><input class="single-count" type="checkbox" id="box" name="chkboxGrp0[]" value="1"></label></td> <td class="vert-middle">0</td></tr> <tr><td>Bring-Stack-Comic</td> <td><input class="single-count" type="checkbox" name="chkboxGrp1[]" value="1"></td> <td class="vert-middle">0</td></tr> <tr><td>Pick-up</td></tr> In JavaScript: var inputNameArray = []; for (var j = 0; j < chkbox.length; j++) { var chkBoxNameStripSqrBraces = chkbox[j].name.replace('[]', ''); <---- if (inputNameArray.indexOf(chkBoxNameStripSqrBraces) === -1 && chkbox[j].checked === true) { chkboxTotal[parseInt(chkBoxNameStripSqrBraces.replace('chkboxGrp', ''))].innerHTML = "1"; inputNameArray.push(chkBoxNameStripSqrBraces); } In PHP: if (isset($_POST['save'])) { $name01 = $_POST['chkboxGrp0[]']; $name01 = $_POST['chkboxGrp1[]']; } Look at arrow in JavaScript, please then goes on save in database... As you can see Javascript use "name", but I need "name" in php to get data from form in HTML, but seem it won't work because of conflict. I'm sorry if you don't understand, I'm ASL user, not english. if still not understand, i will display all whole code.
  5. Sigmahokies

    JavaScript and PHP same time

    Hi everyone, I want to make clear again. I am trying to get data from "name" by PHP in HTML, but problem is "name" is used up by Javascript, but I need "name" for PHP's $_POST to get data from input from html, but can I use this "name" by JavaScript and PHP in same time? I need to get data from that word to post in database, but I think I'm stuck now...Anyone can tell me what is alternative keyword to get data from "name" in HTML? If you don't understand what I said, I will display and show you Thanks, Gary
  6. Sigmahokies

    get data (checkbox) from iframe

    Hi everyone, is it possible to collect data such as checkbox and radio inside iframe when push button outside of iframe? or require to method of post inside iframe?
  7. Sigmahokies

    checkbox and paginate page

    I used session storage, seem it doesn't work. I use localstorage, seem it works a little, but stayed checked on checkbox has not work. here code I get from other website, but seem function is not right <script> function onClickBox() { let checked = $("#box").is(":checked"); localStorage.setItem("checked", checked); $("#msg").text("Checkbox is checked: " + $("#box").is(":checked")); } function onReady() { $("#msg").text("Loaded."); let checked = "true" === localStorage.getItem("checked"); $("msg").prop('checked', checked); $("#box").click(onClickBox); } $(document).ready(onReady); </script> <form> <div id="msg"></div> <table> <tr><th colspan="3">Spatial Verbs</th></tr> <tr><td>Go/Walk-To/From</td> <td><input class="single-count" type="checkbox" id="box" name="chkboxGrp0[]" value="1"></td> <td class="vert-middle">0</td></tr>
  8. Sigmahokies

    checkbox and paginate page

    Does that mean i have to use PHP as well?
  9. Sigmahokies

    checkbox and paginate page

    Hi everyone, I'm trying to create the look like "paginate data page", but it is not. I set up the file to insert in website by iframe, but I need to find a way to make clicked data like click the checkbox, then click on next, go to next file in iframe, then come back, stay checked in checkbox. Do you understand what I mean? I'm not fluent in English, my prime is American Sign Language.
  10. Sigmahokies

    Frame changing by link

    Hi everyone, inside PhpStorm, seem tag of frame has been strike, it might mean it is not support. I want to create like paginate data, but I just want to have page inside frame on page, so I can leave video on left, then other column can be change page by link. Anyone can help? Thanks, Gary
  11. Hi everyone, I am still learning changing PHP by mysqli to PDO. I'm not get used with PDO because it is little complex to understand, but maybe few weeks I will understand how PDO works. Now, I am trying to make redirect with type account in website and database. I am trying to identify type of three - administrator, license, and scorer page. I set up the test to make it work, seem it went dead end, it won't go to admin or license or scorer page. What did I do wrong? maybe something is missing. here my code: <?php /** * Created by PhpStorm. * User: Gary.Taylor * Date: 7/5/2018 * Time: 10:10 PM */ session_start(); require('access.php'); if(isset($_POST['submitted'])) { $username = $_POST['username']; $password = $_POST['password']; if($username && $password) { $login = $GaryDB->prepare("select username, password, Administrator from account Where username = '.$username.' and password = '.$password.' and Administrator = X"); $login->execute(); $count = $login->fetch(); if($count == 1) { $_SESSION['username'] = $username; header('location:admin.php'); } } elseif ($username && $password) { $login = $GaryDB->prepare("select username, password, License from account Where username = '.$username.' and password = '.$password.' and License = X"); $login->execute(); $count = $login->fetch(); if($count == 1) { $_SESSION['username'] = $username; header('location:license.php'); } } elseif ($username && $password) { $login = $GaryDB->prepare("select username, password, Scorer from account Where username = '.$username.' and password = '.$password.' and Scorer = X"); $login->execute(); $count = $login->fetch(); if($count == 1) { $_SESSION['username'] = $username; header('location:scorer.php'); } } else{ header('location:denied.html'); } }
  12. Sigmahokies

    Blur on video background

    Never mind about above, I found a way to make it work Thank you, everyone.
  13. Sigmahokies

    Blur on video background

    Hi everyone, I'm trying to have little blur on background which is video. I added filer:blur(5px) on this video, but it won't work. Is there any way to make it work? I searched in google to see some code in, but none of them are working. Can anyone help? Thanks, Gary Taylor
  14. Sigmahokies

    few checkbox checked, but count as one

    Here example look like:
×