Jump to content

Flanelman

Member
  • Content count

    413
  • Joined

  • Last visited

Awards


This user doesn't have any awards

About Flanelman

  • Title
    Member

System

  • CPU
    i7 4720HQ
  • RAM
    16gb
  • GPU
    GTX 970M
  • Storage
    1tb 7200rpm
  • Display(s)
    1920x1080 matte 15'6
  • Keyboard
    Corsair K50
  • Mouse
    Corsair M95
  • Operating System
    WIN 7 X64

Profile Information

  • Gender
    Male

Contact Methods

  • Steam
    Flanelman

Recent Profile Visitors

693 profile views
  1. Hey guys, So I'm trying to pass a variable into a Where clause in SQL (within PHP) but I can't seem to figure out how to do it, I've had a look on stack overflow but everything I found just looked completely different. I'm sure it's pretty straight forward but I just can't figure it out so I would appreciate any help you guys have to offer! Here's what I've tried: $name = $_POST['studentName']; $getID_query = 'SELECT studentID from student_tbl WHERE firstName=($name)'; $getID_query = 'SELECT studentID from student_tbl WHERE firstName=$name'; $getID_query = 'SELECT studentID from student_tbl WHERE firstName=' $name; $getID_query = 'SELECT studentID from student_tbl WHERE (firstName=$name)'; error: Column not found: 1054 Unknown column '$name' in 'where clause' $name definitely has data as I printed it to the console to check. Also is the value that this query returns stored in "$getID_query"? so if I echo'd $getID_query after the select statement would it print out the selected studentID? Thanks in advance
  2. working JSFiddle code not working in browser

    MY BAD, I forgot to include JQuery, just incase anyone else encounters something similar: Add this line into your <head> tag: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  3. Hey guys, So I'm trying to run some code on my webpage, it works in JSFiddle but it isn't working on my actual web page for some reason. here's the JSFiddle: http://jsfiddle.net/ZakPowley/37PGT/20/ I even made a file containing nothing but the code from within the JSFiddle and even that doesn't work? here is the file contents incase I messed something up: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="checkpoint.css"> <title> </title> </head> <body> <table id="table"> <tbody> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> </tbody> </table> <script type="text/javascript"> $('td').click(function() { $(this).css('backgroundColor', '#000'); }); </script> </body> </html> If anyone has any idea what I've done wrong would greatly appreciate some help, thanks!
  4. 10x10 table and store X/Y of cell selected?

    Awesome, I'll give this a watch, thanks!
  5. 10x10 table and store X/Y of cell selected?

    I'm not too good with it, but I'm willing to try!
  6. Hey guys, I was hoping to somehow implement a 10x10 table onto my webpage where you select a cell and then store the X and Y value of the cell clicked but I'm really not sure on how to store the values, or to make the cell interactive (clickable) without having 100 buttons. My end goal is pretty much something like this: http://materdeimath.pbworks.com/f/GraphPaper20x20AxesUnits.bmp Where I can store the X/Y values of the clicked cell, is this possible? If any of you guys have any idea how I would accomplish this I would really appreciate the help, Thanks!
  7. div content change on button click? JS/JQ/HTML

    Ah I knew it would be a basic mistake I made! Thanks so much for the help, you're a life saver!
  8. div content change on button click? JS/JQ/HTML

    Haha it is pretty big but here you go (it's pretty basic atm) /* removing the white border around the web page below: */ html{ height: 100%; width: 100%; } body { margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; /* background with a gradient, suitable for different browsers */ /* For browsers that do not support gradients */ background: -webkit-linear-gradient(#191922, #23232D); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(#191922, #23232D); /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient(#191922, #23232D); /* For Firefox 3.6 to 15 */ background: linear-gradient(#191922, #23232D); /* Standard syntax */ } .container { height: 100%; width: 100%; } .content { height:850px; width: 1878px; background-color: #23232D; margin-left: 20px; border-width: 1px; border-style: solid; -webkit-border-image: -webkit-gradient(linear, 0 0, 0 100%, from(black), to(rgba(0, 0, 0, 0))) 1 100%; -webkit-border-image: -webkit-linear-gradient(#C2C2CA, rgba(0, 0, 0, 0)) 1 50%; -moz-border-image: -moz-linear-gradient(#C2C2CA, rgba(0, 0, 0, 0)) 1 50%; -o-border-image: -o-linear-gradient(#C2C2CA, rgba(0, 0, 0, 0)) 1 50%; border-image: linear-gradient(to bottom, #C2C2CA, rgba(0, 0, 0, 0)) 1 50%; } div.card { width: 1877px; height:130px; background-color: #191922; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); text-align: center; background: -webkit-linear-gradient(#2D2D37, #191922); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(#2D2D37, #191922); /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient(#2D2D37, #191922); /* For Firefox 3.6 to 15 */ background: linear-gradient(#2D2D37, #191922); /* Standard syntax */ } .card h1 { margin-top: 0px; padding-top: 0px; padding-bottom: 15px; } .content h1 { font-weight: 500; color: #C2C2CA; text-decoration: none; font-family: segoe ui light; font-size: 90px; text-align: center; } .container .header { padding-top: 15px; padding-bottom: 20px; width: 97.05%; margin-left: 3px; background-color: #191922; margin-left: 1.05%; margin-right: -1%; padding-left: 20px; border-width: 2px; border-bottom: 1px solid #C2C2CA; } /* Changing the look of the links here */ .header a.nc { color: #C2C2CA; font-size: 30px; margin-left: 50px; text-decoration: none; font-family: segoe ui light; margin-top: 15px; } .header a.nclogin { margin-left: 1225px; color: #C2C2CA; font-size: 30px; text-decoration: none; font-family: segoe ui light; margin-top: 15px; } .header a:hover { color:#fff; text-shadow: 0 0 10px #FFf } .currentpage { color:#fff; text-shadow: 0 0 10px #FFf; font-size: 30px; margin-left: 50px; text-decoration: none; font-family: segoe ui light; margin-top: 15px; } .content .studentSel { margin-left: 90px; } .content .studentSel .listbox { width: 500px; height: 40px; font-size: 25px; margin-top: 50px; margin-left: 35px; -webkit-appearance: button; -webkit-border-radius: 2px; -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); -webkit-padding-end: 20px; -webkit-padding-start: 2px; -webkit-user-select: none; background-image: url(http://i62.tinypic.com/15xvbd5.png), -webkit-linear-gradient(#FAFAFA, #F4F4F4 40%, #F4F4F4); background-position: 97% center; background-repeat: no-repeat; border: 1px solid #AAA; color: #000; font-size: inherit; overflow: hidden; padding: 5px 10px; text-overflow: ellipsis; white-space: nowrap; margin-top: 50px; font-size: 30px; } .content .studentSel .listboxSmall { width: 150px; height: 40px; font-size: 25px; margin-top: 50px; margin-left: 35px; -webkit-appearance: button; -webkit-border-radius: 2px; -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); -webkit-padding-end: 20px; -webkit-padding-start: 2px; -webkit-user-select: none; background-image: url(http://i62.tinypic.com/15xvbd5.png), -webkit-linear-gradient(#FAFAFA, #F4F4F4 40%, #F4F4F4); background-position: 97% center; background-repeat: no-repeat; border: 1px solid #AAA; color: #000; font-size: inherit; overflow: hidden; padding: 5px 10px; text-overflow: ellipsis; white-space: nowrap; margin-top: 50px; font-size: 30px; } .content .studentSel label { font-size: 40px; text-decoration: none; font-family: segoe ui light; padding-top: -15px; color: #fff; margin-left: 70px; } .content .studentSel2 label { font-size: 40px; text-decoration: none; font-family: segoe ui light; padding-top: -15px; color: #fff; margin-left: 450px; } .results2 label { font-size: 40px; text-decoration: none; font-family: segoe ui light; padding-top: -15px; color: #fff; text-align: center; } .content input[type=password] { color: #000; padding-left: 10px; width: 250px; height: 40px; font-size: 30px; } .content input[type=text] { margin-top: 50px; color: #000; padding-left: 20px; width: 600px; height: 40px; font-size: 30px; } div.results { margin: auto; width: 1300px; margin-top: 50px; height:610px; background-color: #191922; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); text-align: center; background: -webkit-linear-gradient(#2D2D37, #191922); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(#2D2D37, #191922); /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient(#2D2D37, #191922); /* For Firefox 3.6 to 15 */ background: linear-gradient(#2D2D37, #191922); /* Standard syntax */ } div.results2 { margin: auto; width: 1300px; margin-top: 30px; height:550px; background-color: #191922; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); text-align: center; background: -webkit-linear-gradient(#2D2D37, #191922); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(#2D2D37, #191922); /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient(#2D2D37, #191922); /* For Firefox 3.6 to 15 */ background: linear-gradient(#2D2D37, #191922); /* Standard syntax */ } div.btns { margin-left: 450px; margin-top: 50px; } /* smaller version of the button - same style*/ .content .switchBtn { margin-top: 40px; width: 400px; height: 50px; font-size: 30px; font-family: segoe ui light; margin-left: 800px; padding-bottom: -15px; } .content .switchBtn:hover { margin-top: 40px; width: 400px; height: 50px; font-size: 30px; font-family: segoe ui light; background-color: #C2C2CA; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); } .content .switchBtn2 { margin-top: 40px; width: 830px; height: 50px; font-size: 30px; font-family: segoe ui light; padding-bottom: -15px; } .content .switchBtn2:hover { margin-top: 40px; width: 800px; height: 50px; font-size: 30px; font-family: segoe ui light; background-color: #C2C2CA; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); } .content .cust_btn { margin-top: 40px; width: 1000px; height: 130px; font-size: 40px; font-family: segoe ui light; } .content .cust_btn:hover { margin-top: 40px; width: 1000px; height: 130px; font-size: 40px; font-family: segoe ui light; background-color: #C2C2CA; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); } .button_switch { height: 110px; width: 1000px; } .del_student { display:none; } .results2 .add_student h1 { margin-bottom: -20px; } .results2 .del_student h1 { margin-bottom: -20px; }
  9. div content change on button click? JS/JQ/HTML

    It's hosted on my Uni's servers so should be fine, an error only appeared in the console after I added that script line you just posted, before that nothing. The error was a 404 can't find resource. Here's the entire code, sorry it's a bit messy: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> add/delete </title> <!-- css file for the page linked below. --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="checkpoint.css"> <!-- script to switch the content shown from add to delete --> <script type="text/javascript"> $('#btnClick').on('click',function(){ if($('.add_student').css('display')!='none'){ $('.del_student').show(); $('.add_student').hide(); }else if($('.del_student').css('display')!='none'){ $('.add_student').show(); $('.del_student').hide(); } }); </script> </head> <body> <div class="container"> <div class="header"> <!-- navigation to load the other pages below --> <a href="marking.html" class="nc">Marking</a> <a href="#" class="currentpage">Staff</a> <a href="students.html" class = "nc">Students</a> <a href="" class="nclogin"> Log In</a> </div> <!-- header div ends here --> <div class="content"> <div class="card"> <h1>Add/Delete Student</h1> </div> <button id="btnClick" class="switchBtn">Toggle</button> <div class="results2"> <div class="add_student"> <form action="/action_page.php"> <h1>Add Student</h1> <label>Student ID : </label> <input type="text" name="studentnum" required><br> <label>First name : </label><input type="text" name="firstname" required><br> <label>Last name : </label> <input type="text" name="lastname" required><br> <input type="submit" class="switchBtn2" value="Submit"> </form> </div> <div class="del_student"> <h1>Delete Student</h1> <!-- inputs to search will go here --> </div> </div> <!-- add a selector to choose whether you delete or add. --> </div> <!--content div ends here --> <div class="footer"> </div> <!-- footer ends here --> </div> <!-- container div ends here --> </body> </html> Thanks again for the help.
  10. div content change on button click? JS/JQ/HTML

    Hey Frank, thanks for the response! That is exactly what I'm after, however I tried that code on my page and it still didn't work which was odd since the JSFiddle works, I even copied the entire code from JSFiddle and replaced what I had In my code to no avail and then even copied it back to make sure I didn't mess something up and that worked still. Any ideas what could be going on there? It's working, just not on my page? Even tried clearing my cache, pretty confused.
  11. Hey guys, So I want to have an area on my page used for both adding and deleting students, when the page loads I want it to display the add student div, but then when the button is clicked I want it to switch to the delete student div and vice versa. I've been trying to use stack overflow to get an answer but every time I try rework another answer into mine I get really confused and muddled up since I'm new to JavaScript. Here's the code I've got at the moment: <!-- script --> <script type="text/javascript"> $('#btnClick').on('click',function(){ if($('#add_student').css('display')!='none'){ $('#del_student').show().siblings('div').hide(); }else if($('#del_student').css('display')!='none'){ $('#add_student').show().siblings('div').hide(); } }); </script> <!-- html --> <button id="btnClick" class="switchBtn">Delete Student</button> <div class="results2"> <div class="add_student"> <h1>Add Student</h1> <!-- inputs to add will go here --> </div> <div class="del_student"> <h1>Delete Student</h1> <!-- inputs to search will go here --> </div> Would greatly appreciate any help, been stuck on this for a while now. Thanks in advance
  12. ....... So you got them numbers or?..
  13. Hey guys so I've given this a google and there's a few examples, some I found didn't work and some were top->bottom but I didn't understand the code enough to change the direction because there was no explicit left/right/top/bottom etc. So pretty much I want to add a border to my header div that starts out light on the left and right, and gets dark at the middle, I would be very grateful if someone could help me out with this! Thanks in advance.
  14. <P> tag within PHP to output PHP var?

    Haha well I appreciate the help none the less! Thanks again dude.
  15. <P> tag within PHP to output PHP var?

    Ah that was the problem, needed a period before $last too but that was the issue, thanks heaps man! here's the code that I used: echo '<p class="added_text"> Sailor ' . $first .' ' .$last .' added Successfully to team '. $team .' </p>';
×