Jump to content

Search the Community

Showing results for tags 'code'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

  1. I am to do a simple calculator in C# windows forum. This is my first time doing C# and I've scoured what I could to figure this out. I'm not looking to copy and paste, I want to understand what I'm doing. My biggest issue at this moment is figuring out how to have the calculator solve a line of numbers. My calculator you can hit the buttons to enter numbers and the expression or whatever, but I can only figure out how to do it with two numbers. Any Ideas?
  2. Good Afternoon, I wonder if someone could help. I'm looking at the filter/search table 'How To', here: https://www.w3schools.com/howto/howto_js_filter_table.asp Ideally, we would like to create a table that is searchable across all columns, is this possible? At the moment I can see how to make it search column 1 or column 2, I would ideally like it to search both. Using the example on the 'How To' page it would mean that someone could search either a name or a country and they would see the results they wanted. TIA.
  3. Hi there, so i have a file that needs to be decoded, this is a thing now that i can't do it. So any help would be highly appreciated. Please help me decode this code, its been weeks and i'm still in the same place text.txt
  4. Hello, I have been using W3 tutorials to create custom code elements on my weebly website. Lately I have been having issues with a code I created from two separate tutorials: image roll over and responsive size. The code is situated within a greater grid created with weebly's building tools. Image rollover and responsive size work in W3's try it editor, but on my website only the rollover works. On a full size window everything looks just fine (the bottom left is the custom coded element) but a slighter smaller window results in a slide bar to view the full image, because it will not scale down. On a phone-scaled window, the opposite happens and it doesn't scale up, appearing significantly smaller. Any help would be much appreciated!!! I have included images and the latest code I've tried to show what's happening. Thank you!!!!! <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> img{ width: 100%; height: auto; } .box{ width: 100%; height: auto; position: relative; display: inline-block; margin: 10px 0px 10px 0px; } .box .img-top { width: 100%; height: auto; display: none; position: absolute; top: 0; left: 0; z-index: 0; } .box:hover .img-top { display: inline; </style> </head> <body> <div class="box"> <img src="https://drive.google.com/thumbnail?id=1NJjBTmUClAxB3vqIDrDKzFTAF_HFqzHI" alt="Card Front"> <img src="https://drive.google.com/thumbnail?id=1XNQ_ARudR0M_hEuB3ErCyxDhHxSGKPMo" class="img-top" alt="box Front"> </div> </body> </html> <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> img{ width: 100%; height: auto; } .box{ width: 100%; height: auto; position: relative; display: inline-block; margin: 10px 0px 10px 0px; } .box .img-top { width: 100%; height: auto; display: none; position: absolute; top: 0; left: 0; z-index: 0; } .box:hover .img-top { display: inline; } </style> </head> <body> <div class="box"> <img src="https://drive.google.com/thumbnail?id=1NJjBTmUClAxB3vqIDrDKzFTAF_HFqzHI" alt="Card Front" width="720" height= "720"> <img src="https://drive.google.com/thumbnail?id=1XNQ_ARudR0M_hEuB3ErCyxDhHxSGKPMo" class="img-top" alt="box Front"width="720" height= "720"> </div> </body> </html>
  5. Hi all, I found this code <div class="content-box-purple">text</div> to use for a box in a post. I copied this code: /* Content Box ------------------------------------------------------------ */ .content-box-purple { margin: 0 0 25px; overflow: hidden; padding: 20px; } .content-box-purple { background-color: #e2e2f9; border: 1px solid #bebde9; } to a style.css file. However, the box does not show in the post. I checked all plugins for compatibility and when deactivating them all, the box still does not show. Do you have an idea of what might be wrong? Thank you, Milada
  6. Hello. I am currently editing my register.php file, which creates the user's account, but also at the same time makes a new file - their profile page. Here is the function: // Create profile page. $handle = fopen($username.".php", 'w'); $pageContent = ""; function createProfile() { fwrite($handle, $pageContent); } createProfile(); This function works, but not when I put this code inside -> https://pastebin.com/9j3rR12v. I have tried to swap all of the " for ' but it doesn't work. What happens is the register.php page does not load at all. It says there is an error. However, it loads the register.php page when I put: // Create profile page. $profileContents = include (profileContents.txt); $handle = fopen($username.".php", 'w'); $pageContent = "<!DOCTYPE html> <head><title>The title has changed.</title></head>"; function createProfile() { fwrite($handle, $profileContents); } createProfile(); When I then make an account, it creates the file, but the content doesn't go inside. A link to the code I would like to be displayed can be found here (compressed version): https://pastebin.com/9j3rR12v If you are able to help me out, it would mean the world. Many thanks. Emergency email: whunter@voltboxgaming.co.uk
  7. Stella

    HTML

    Hello. This is my first steps of learning html but i have a problem. Attacked you'll find the code and the file that i have the image. It doesn't appears to the browser. Am I doing smth wrong? Thank you!
  8. Stella

    HTML images

    Hello. This is my first steps of learning html but i have a problem. Attacked you'll find the code and the file that i have the image. It doesn't appear to the browser. Am I doing something wrong?
  9. Hi, Can someone please help with some code I am trying to have the numbers *clicked* & stay blue in color and then display over on the right side in the ? circles only allowing each number to be used once photo is attached of my web page
  10. I have tried some custom code to insert a road sign image into my lecture title, but it's not showing. Here's my snapshot screen I photoshopped (green highlight). This code is not showing up in the title. <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Liberian_Road_Signs_-_Regulatory_Sign_-_Stop.svg/120px-Liberian_Road_Signs_-_Regulatory_Sign_-_Stop.svg.png" style="width:10%;height:10%;"> Your assistance will be very much appreciated. James
  11. hi there... i use the dot slideshow indicator with the carousel code for automatic advance images, but can´t make points changes togheter with the image changes with the code... any ideas? sorry about my english.... here is the code... thanks in advance. <header class="w3-display-container w3-center" id="home" style="padding-top: 150px"> <div class="w3-content w3-display-container" style="max-width:800px"> <img class="mySlides" src="img-1.jpg" style="width:100%"> <img class="mySlides" src="img-2.jpg" style="width:100%"> <img class="mySlides" src="img-3.jpg" style="width:100%"> <img class="mySlides" src="img-4.jpg" style="width:100%"> <div class="w3-center w3-container w3-section w3-large w3-text-white w3-display-bottommiddle" style="width:100%"> <div class="w3-left w3-hover-text-khaki" onclick="plusDivs(-1)">&#10094;</div> <div class="w3-right w3-hover-text-khaki" onclick="plusDivs(1)">&#10095;</div> <span class="w3-badge demo w3-border w3-transparent w3-hover-white" onclick="currentDiv(1)"></span> <span class="w3-badge demo w3-border w3-transparent w3-hover-white" onclick="currentDiv(2)"></span> <span class="w3-badge demo w3-border w3-transparent w3-hover-white" onclick="currentDiv(3)"></span> <span class="w3-badge demo w3-border w3-transparent w3-hover-white" onclick="currentDiv(4)"></span> </div> </div> </header> <script> //slideshow carousel var myIndex = 0; carousel(); function carousel() { var i; var x = document.getElementsByClassName("mySlides"); for (i = 0; i < x.length; i++) { x[i].style.display = "none"; } myIndex++; if (myIndex > x.length) {myIndex = 1} x[myIndex-1].style.display = "block"; setTimeout(carousel, 9000); } //new code var slideIndex = 1; showDivs(slideIndex); function plusDivs(n) { showDivs(slideIndex += n); } function currentDiv(n) { showDivs(slideIndex = n); } function showDivs(n) { var i; var n = document.getElementsByClassName("myIndex");//quitar var x = document.getElementsByClassName("mySlides"); var dots = document.getElementsByClassName("demo"); if (n > x.length) {slideIndex = 1} if (n < 1) {slideIndex = x.length} for (i = 0; i < x.length; i++) { x[i].style.display = "none"; } for (i = 0; i < dots.length; i++) { dots[i].className = dots[i].className.replace(" w3-white", ""); } x[slideIndex-1].style.display = "block"; dots[slideIndex-1].className += " w3-white"; } </script>
  12. Woocommerce took out the option for enabling a lightbox feature for your image gallery earlier this year. They have in their documentation to add code if you want to enable the gallery features but don’t actually say where. https://woocommerce.wordpress.com/2017/02/28/adding-support-for-woocommerce-2-7s-new-gallery-feature-to-your-theme/ This is a significant frontend change that can be broken down in to three separate new features; Image zoom / magnification Lightbox Slider To enable each of these features in your theme you must declare support using add_theme_support() like so; 1 2 3 4 5 6 7 add_action( 'after_setup_theme', 'yourtheme_setup' ); function yourtheme_setup() { add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); } This allows you the flexibility to pick and choose exactly which features you want to include/exclude in your theme or at your store. I am not a developer, I don’t have a developer (and shame on WC for not making this an option that end users can opt for or not without having to add code!) I need to know where to put this code. I am using a child theme called mystile1. I have files called “Theme Functions (function.php)” and one called “custom.css” that’s says it is specifically for adding code to modify my child theme styles. I don’t know which file I should put the above coding in and where. Nowhere does each of these files have a line called “after_setup_theme” So would I be safe in just adding the code as follows in one of those files (which one?) replacing “yourtheme” with the name of my theme: add_action( 'after_setup_theme', 'mystile1_setup' ); function mystile1_setup() { add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); } Or any other suggestions are greatly appreciated. Thank you.
  13. Hello guys I need a software or a site that is free or cheap not like Zend guard and stuff it is about 600$ but I need something free or till 50$. I want to encode my PHP codes in a good way and it will be hard to encode it actually 99% of people should could't decode it. Thanks
  14. Hi! What is the license for the code samples on w3schools.com? Do they require any credit/attribution? I'm just asking because if you are allowed to follow it/use it as a guide for how to do something when working on a project (commercial, personal). Thanks!
  15. Hi W3S I am trying to make a login PHP code with MySQLI and it won't work for some reason, not sure what i have done wrong, can someone see what i did wrong? This is the code: //////////////////////////////////////////////////////////////////////////////////////////////////////// // Login //////////////////////////////////////////////////////////////////////////////////////////////////////// $SUBMIT_FORM_ACTION___TakeLoginForm = (isset($_GET["SUBMIT_FORM_ACTION"]) ? $_GET["SUBMIT_FORM_ACTION"] : ""); if( $SUBMIT_FORM_ACTION___TakeLoginForm == "TakeLogin" ) { $query_1 = "SELECT u_id, u_username, u_password, u_email FROM users WHERE u_email=? AND u_password=?"; if ( $stmt = $mysqli->prepare($query_1) ) { $FORM_email = $_POST['email']; $FORM_password = $_POST['password']; $stmt->bind_param('ss', $FORM_email, $FORM_password); $stmt->execute(); $stmt->bind_result($id, $username, $password, $email); $stmt->fetch(); // SECURITY! CHECK & COMPARE! if($FORM_password !== $password) { die(" <center><b>(Form) Login ErrMSG #1</b></center> <br /> <center>Password incorrect/wrong! Try again!</center> "); } // Make Sessions Needed! $_SESSION['user'] = array(); $_SESSION['user']['id'] = $id; $_SESSION['user']['username'] = $username; $_SESSION['user']['password'] = $password; $_SESSION['user']['email'] = $email; $stmt->close(); //header("location: index.php"); } } okay so lets see if i get this straight. In the bind_result part, this does not matter what kind of variable it is right? In the naming part... or does the names actual HAS to be like the ones in the Database Columns? I somehow think its the part there but correct me if i am wrong... Hoping someone can help me a little bit. Thanks in advance
  16. Hi guys, PROBLEM SOLVED (You Can lock this post)
  17. Hi Guys, I have a slight problem with some of my code. I have a series of tables running down a page with each table containing different data. All looks fine when I look at it as a HTML page but when I use it as an Email 2/3 elements move for some reason, is there a way I can make sure these elements won't move? The code is in the backend of a program I use and gets called as Emails are generated for different subjects. Thanks in advance, Craig.
  18. I found a code to automatically connect people on linkedin, but it is not working. It says, illegal character. Found it here http://www.iftiseo.com/2015/02/code-to-increase-linkedin-connections.html What is wrong?
  19. hello, Maby you can help me make somthing I have done things myself but i am a litle stuck it has somthing to do with my admin of product list like you can see in the picture i have done alot but now i want to ad a percentage i know that it has somthing to do with taking the result out of the column named (winstverlies) and devide that trough the purchese price and multiply this by 100 but i can not implement this in my code. the code is PHP so who can help me? so i want it to look like on the picture. is this posible? picture is in the file named percentage.jpg So i would be verry pleasd if you could help me?
  20. Hi, Can anyone recommend anywhere that I can learn code part time in the United Kingdom? I have been teaching myself html, css, etc on a basic level & now venturing into php, mysql, js, etc & think that having a tutor or guidance would really help speed up my learning process. Any companies or colleges offering part time courses in these area's will hopefully fill in the holes in my knowledge & help me progress. I'm not really concerned about qualification certificates, the knowledge is more important to me. Thanks for any advice. Old Guy.
  21. So, I have a code that asks a question, and if the answer in correct, it says correct in the div. If incorrect, it says incorrect. For some reason it always says incorrect even if my answer is correct. Please help, is there anything wrong with this code? //*If players 1 turn if (player == "1"){ //*Asks question var trivia = prompt(questions_obj.question); //*If answer is corerct do stuff if (trivia === questions_obj.answer){ document.getElementById('correctincorrect').innerHTML = "Correct"; $('#character1').animate({left: "+=75px"}, 500, function(){ //*If player gets to finish they win if (player1total == "8"){ var winner1 = alert("Player 1 is the winner!"); $('#character1').remove(); $('#character2').remove(); $('#character3').remove(); $('#player1score').remove(); $('#player2score').remove(); $('#player3score').remove(); $('#player1header').remove(); $('#player2header').remove(); $('#player3header').remove(); $('#player1board').remove(); $('#player2board').remove(); $('#player3board').remove(); } }); //*Adds up players score player1total = player1total + 1; document.getElementById("player1score").innerHTML = player1total; } if (trivia === questions_obj.answer2){ document.getElementById('correctincorrect').innerHTML = "Correct"; $('#character1').animate({left: "+=75px"}, 500, function(){ //*If player gets to finish they win if (player1total == "8"){ document.getElementById('correctincorrect').innerHTML = "Player 1 is the winner!"; $('#character1').remove(); $('#character2').remove(); $('#character3').remove(); $('#player1score').remove(); $('#player2score').remove(); $('#player3score').remove(); $('#player1header').remove(); $('#player2header').remove(); $('#player3header').remove(); $('#player1board').remove(); $('#player2board').remove(); $('#player3board').remove(); } }); //*Adds up players score player1total = player1total + 1; document.getElementById("player1score").innerHTML = player1total; } if (trivia != questions_obj.answer || trivia != questions_obj.answer2){ document.getElementById('correctincorrect').innerHTML = "Incorrect"; }}
  22. Hello, I have recently been working on a HTML form to submit new results into a search engine. However I have ran into a problem that I cant seem to get past. I have one page where the info from the form can be properly submitted, however it requires a password to get into. (its the admin panel) located at index.php?a=admin However when a user tries to insert a new site to the form the just are denied access because they cant log into the admin panel, even though the form itself is not actually in the admin panel... The HTML form looks like this and is located in a page called /AddSite.html however its trying to submit the info to /index.php?a=admin how can I use JavaScript to possibly bypass needing the password? and not redirecting to the admin panel when you click submit? (Also, not as important as the above issue... but as you can see I tried to add a capatcha, but I cant get it to be required, users can press submit without even using the capatcha... if anyone could tell me what I did wrong that would be helpful ) my current code: <form action="/index.php?a=admin" method="post"><div class=""> Site Title: <input type="text" name="addtitle" value="" required/><br /> Site URL: <input type="url" name="addurl" value="http://" required/><br /> Site Description: <br /><textarea lass="ads" name="adddesc" required></textarea><div align="center" class="g-recaptcha" data-sitekey="6LfDoAYTAAAAAOUmPcjfwv3I84xYqFBV5tyQMPJu"></div></div><br /><input type="submit" value="Add new result"/></form> Any help works!!!
  23. hello so i created a registration page in html and a php code to connect to a database and enter the information to the database that all works. Now i want to ask if the user wants to log in would they need a separate php code to have a sort of certification that the account is valid? i made a html page for login but i need it to look back to the database to see if the user is registered so they can log in, not just anyone can log in...any ideas? or advice where i can find information about this? i see a lot of tutorials for making a log in page, making a registration page but how about when someone registers and wants to log in but to make sure the database can also check to see if the user is registered.
  24. RaRa3

    registration php

    hello so i am making a registration page using html and php, i need to make the information send to mysql that i made with table but i never made select statements..i am not sure on how to make it i need help i am new to this so please bare with me. So I this code to connect to mysql none I am not sure how to fix it i know there must be a problem with the code for the submit line and with the isset. I got them from another user but made minor changes to fit my database. My database has 2 tables one named UserAccount with the information listed in the registration page and then another table named Cart for purchases to be made. Please if you can help me with my code or if you see other errors i think i might have an error with my php where i put firstName, and etc. and if you know any other material or links that would help me for making product information and a cart send to a database if you can share it, im trying but having many issues
  25. Hello so i have a problem if you can help teach me please so I need to run a HTML file that i created on a server, it can be local i need to do it for a school project take a html file and make it run on a server, I will be using my computer but i don't know how it can work on a server. Also I have a mac if you can help on how I can run a html file on my computer onto a server
×
×
  • Create New...