Jump to content

Chikwado

Members
  • Posts

    287
  • Joined

  • Last visited

Everything posted by Chikwado

  1. Good day admin Please a newbie is struggling here and needed a help. <?php $db = new SQLite3('test.db'); $userlog = "Chikwado"; $userpass = "wizard&33"; $sql = "SELECT * FROM user WHERE username = '$userlog' AND password = '$userpass' LIMIT = 1"; $result = $db->query($sql); while ($row = $result->fetchArray(SQLITE3_ASSOC)){ if($row['username'] === $userlog && $row['password'] === $userpass) { echo "Login was successfully."; }else{ echo "Invalid credentials."; } } unset($db); ?> To run the code above, I get http code failure. I need help and advice. Your advice is greatly appreciated.
  2. SELECT * FROM table WHERE id = '1' AND firstname = 'Smith'
  3. Good day administrator Please how to rotate image on my website, that is, each time I refresh the page it display new image. Below are my JavaScript so far. [code] <html> <head> <script> var photo = ["image/image1.jpg","image/image2.jpg","image/image3.jpg"]; var i = Math.floor(photo.length*Math.random()); document.getElementById("show").src = photo[i]; </script> </head> <body> <img id="show" src="" alt="Image"> </body> </html> [/code] <html> Thanks.
  4. Good day admin. Please where can I find w3schools APK file that I installed in my Android phone some time ago, the APK just disappeard and could not be seen any where. I would like to read offline to manage high-cost of data. Any information about that offline installation is greatly welcome. Thank in advance.
  5. Someone help with better explanations on code below. I want to test uploading picture in database using the script below. The code is not showing success or error and I'm unable to figure out what to do. [code] <html> <head> <?php $servername = "server"; $username = "username"; $password = "passme"; $dbname = "mydb"; $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } if(isset($_POST["submit"])) { $name = $_FILES["fileupload"]["name"]; $username = $_POST["username"]; $text = $_POST["textdata"]; $target_dir = "upload/"; $target_file = $target_dir . basename($_FILES["fileupload"]["temp_name"]); // Select file type $imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION)); // Valid file extensions $extensions_arr = array("jpg","jpeg","png","gif"); // Check extension if( in_array($imageFileType,$extensions_arr) ){ // Upload file if(move_uploaded_file($_FILES['fileupload']["name"],$target_dir.$name)){ // Convert to base64 $image_base64 = base64_encode(file_get_contents('upload/'.$name) ); $image = 'data:image/'.$imageFileType.';base64,'.$image_base64; // prepare and bind $stmt = $conn->prepare("INSERT INTO messagebox (image, username, reg_date, text) VALUES (?, ?, ?, ?)"); $stmt->bind_param("ssss", $image, $username, NOW(), $text); $stmt->execute(); echo "<>Success!"; $stmt->close(); $conn->close(); } } } ?> </body> </html> [/code]
  6. How to use while looping, to access element in array in c++.
  7. Just like we use ajax to navigate XML, Then, Is it possible to navigate JSON as well? Example of the xml are here
  8. I have just heard the word "Polymorphism" And I discovered that it is javascript, but do not know how to apply it.I am wondering if this could be part of it example
  9. What is javascript polymorphism?
  10. While creating javascript source file, Is it possible to add two file in one script. example: Js file
  11. Chikwado

    Need a cue

    Oh my goodness, I have not so far seen it. Thanks.
  12. Chikwado

    Need a cue

    Some one help with a cue. I don't understand what this properties really does. The first example was clear to me but the second example was not. Can you explain more.
  13. I did not, Is it available anywhere for installing?
  14. Http error 500 internal server error, FastCGI exited unexpectedly. Error code: 0xc0000135. I am trying to run php in IIS. Some one help please. I have read from so many address link but could not resolve it.
  15. Http error 401.3 Unauthorized. You don't have permission to view this directory or page because of access control list(ACL) configuriation or encription setting for this source on the web server. Can some one help explain these and solution to solve it. Thanks in advance.
  16. Chikwado

    Virtual Directory

    How to setup virtual directory after installing IIS, I have installed IIS successfully, if type localhost in browser it return success. Now, How to setup and create new directory and its file.
  17. The length of That your script will not stop you from posting them, You need to post them or upload it online so we can take a closer look on it. Also, you need to be specific. Always go step-by-step while creating a code. Be sure of what a code does before even trying to copy them. Because a code you wrote by yourself will never be complicated. That so called "copy and start using" that is where you will encounter problem.
  18. What you see in that link is that you need to lay it aside. Choose a language you know, explain a certain command you want to write and how you have tried but failed. Then we will help you achive the result. Or if you are developing a new language, then It will be extremely difficult that you would get help here. After all, Your new language is not known.
  19. Which server programming language is that? asp is server programming language and php as well. Can you give a cue about the name of that language and may be we can help you look into it.
  20. Some one help with cue. readyState and onreadystatechange Is it client object or server object? It was written in javascript but seem to be server object.
  21. Some one help with cue, How to save file and preview in sublime text. After saving my file it appear at top line of the "sublime text", I try to search for it in hard drive but could not see it.
×
×
  • Create New...