Jump to content

NotSunfighter

Members
  • Content Count

    43
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by NotSunfighter

  1. You really don't need to use a DIV in the HTML code. Your video is at 100% and centering is unresponsive. To center the <B> text use: style="text-align:center;display:block;margin: 0 auto;" to the tag I found a hack for you to try. Add an ID to the video (ID="myvideo"). Then use JAVASCRIPT: <script> document.getElementById('myvideo').play(); </script> See if that works.
  2. I personally would not recommend a framework for anything. Why learn a new language to write a language you already know? Frameworks use the language to make clips that you need new language to call. Just start your own library of clips and stay with the original language. When I was writing a large amount of PHP I did use SASS or SCCS to write it. Look into this, it's not hard to learn and does save you time.
  3. The admin panel on my site is not under my control. Are you able to change your admin panel? If you control it we'd need to see the code. How about making two menus OKmenu.php and FullUpMenu.php and change which one you will call from index.php, manually or as stated above? Your index.php file may look like this: echo" <table border=\"1\" class=\"tblmare\" width=\"795\" style=\"border-collapse: collapse\" align=center> <tr class=trsus> <td>"; include 'routing.php'; echo" </td></tr> <tr> <td> <center>"; /* Change the menu here Pick one and then comment the other out */ include 'OKmenu.php'; //include 'FullUpMenu.php'; echo" </center></td> </tr><tr><td> and more.... Sloppy, but you get the idea - right?
  4. The easiest way of doing this is to change the page you send them to when they click on the “New Application” menu. I would use the new page to not only inform them that you can not take new users, but also collect their information to get back to them if an opening occurs. Since you have MySQL you can look up a token and add a IF loop to the menu selection area, This way you could program a PHP program to do this automatically and send auto send the email when space is available. Or this can be done manually by staff. Cel mai simplu mod de a face acest lucru este de a schimba pagina la care le trimiteți atunci când fac clic pe meniul „Aplicație nouă”. Aș folosi noua pagină pentru a-i informa nu numai că nu puteți lua utilizatori noi, ci și să strâng informațiile pentru a vă întoarce la ei dacă are loc o deschidere. Deoarece aveți MySQL, puteți căuta un token și adăugați o buclă IF în zona de selectare a meniului, În acest fel, puteți programa un program PHP pentru a face acest lucru automat și puteți trimite automat e-mailul atunci când spațiul este disponibil. Sau acest lucru poate fi făcut manual de către personal.
  5. Sorry for the intrution, but the line above that: while ($row = $res->fetch_assoc()) { Has NO ending bracket
  6. You should post the web url and what you want changed. Google translate does Romanian: Ar trebui să postați URL-ul web și ceea ce doriți s-a schimbat.
  7. Why are you pulling everything from the db with the * when all you want is the rank? In your echo you are putting a double quote inside a double quote. => You have a rank of " . $user['rank'] . "
  8. Stop using tables. Use divs for the cells. Put them in a container and flex that.
  9. Not going to code this, but off the top of my head I would use Flex-box and not a table. Set it up to display as you have it above (horizon.) . Then set the flex order by row to instantly create a vertical table.
  10. Was expecting the 6 blocks to be clickable.
  11. Got your first foreach to work with: foreach ($xmlA->PRODUCT as $proda) { echo $proda->PRODUCT_NUMBER; echo $proda->PRODUCT_NAME; echo $proda->PRODUCT_PRINT_ID; }
  12. I believe I would convert the mm entrees to meters first then get the square meters. $dimension1 = 850/1000; $dimension2 = 1447/1000; $square_metres = $dimension1 * $dimension2; The results would be 1.22995 square meters. You can use number_format() if you need to limit the number of decimal places.
  13. This is an example of LABEL with INPUT. Works down to 175px width. At this point a keyboard for input is useless. The placeholder attribute was to be a 'hint'. You give a book a title like The Long Kiss Goodnight" and a hint like P. Eye story <!DOCTYPE html> <html lang="en"> <head> <style> #find-search { background: #3a658e; padding-left: 10px; border-radius: 3px; cursor: pointer; margin-left: 5px; color:white; } #find-search:hover { background-color: #399edc } #quickfind{ font-size: smaller; } </style> </head> <body> <form action="/quickfind" id="quickfind" method="post" name="quickfind"> <label for="find-search">Quick Search</label> <input type="text" id="find-search" placeholder="Keywords"> </form> </body> </html> I'd rely on placeholders in situations like this: <!DOCTYPE html> <html lang="en"> <head> <style> #find-search { background: #3a658e; padding-left: 10px; border-radius: 3px; cursor: pointer; color:white; } #find-search:hover { background-color: #399edc } </style> </head> <body> <form action="/quickfind" id="quickfind" method="post" name="quickfind"> <label>Enter your name</label><br> <input type="text" id="find-search" placeholder="First name"><br> <input type="text" id="find-search" placeholder="Last Name"> </form> </body> </html>
  14. Horrible coding practice to use a placeholder in place of a <label>.
  15. You have a link that the user pushes to see the number of new messages; so it most probably is done through AJAX. A listener on that link would change anything. What I think your looking for is PUSH notifications which are way above your pay grade. You could simulate push notifications with a time loop in JS to send the request every once in a while.
  16. This is my take on your question. Have a sign in page. This will give the user an identification. On that page list all things that are to be worked on. Identify which items are in use and which are open. Maybe back ground color etc.. The user selects what he/she wants to work on first - that assigns this page to her. Then have user pick which he wants to be notified when available. Add him to the list. You can work thing out from there.
  17. Jayfromsandiego give my script a try please and post here for a little while. Let me know what you think of the script - we can fix any problems that you have with it. I am new here myself - Most posts I see here are to help people with problems. ginerjm maybe a little ruff with his answers, but he does give good advice. I think he just didn't look at what you posted very close, but he did look. When I did this my eye sight was not up to it's potential Don't go away mad - stay and get the help you need.- Just had the lids operated on, so I could not see the pictures you loaded and just went with the code.
  18. The code you found looks like a training thing about Jquery and has little to do with the actual problem and more about how Jquery does really nice stuff. I wrote everything from scratch, almost. Lots of tweaking needed. Fast explanation about the JS: When page loads we set up a new XMLHttpRequest() so we can use AJAX to get to the PHP file. The rest is a function called by the 'submit' button. I use a loop to query all the input tags and count the number of radio buttons selected. This could have been a little more precise in the tag called. - 6 questions so I need 6 checked buttons. I use a IF/ELSE section for that. You will need to handle the Not Equal section. myString will be the values of the selections separated by a comma. This string is sent to my 'test5.php' file by the rest of the code - right after I remove the comma at the end of the string. In the PHP file I make a string of correct answers $mine. I then convert that string and the string I received via the $_GET[] into arrays. Followed by a for loop to compare each answer to the master array and send the outcome back to the main file, where it is posted. The main file has been moved and worked on in various browsers and text editors - I think it's good code, but at this point no guarantees cause I'm done working on it today. Main File HTML <!DOCTYPE html> <html lang="en"> <head> <title>Website - Voting Poll (Javascript)</title> <link href="https://fonts.googleapis.com/css?family=Josefin+Sans" rel="stylesheet"> <style> body{ font-family: 'Josefin Sans', sans-serif; } h1 { text-align: center; } #container { width:50%; margin: 150px auto; padding: 50px 30px; background-color: #3f51b5; border-radius:3px; color: #fff; box-shadow: 0 0 10px 0 #999; } ol { list-style-type: none; padding: 0; margin: 0; width: 500px; } ol li { background: #223394; width: 200px; margin: 10px; padding: 5px; } input, label{ cursor: pointer; } input[value="no"]{ margin-left: 45px; } button{ width : 70px; margin-left: 10px; } </style> </head> <body> <div id="container"> <h1>Voting Poll >> In Less Than A Minute</h1> <div id="proof"></div> <ol> <li>This is question #1<br> <label for="yes1"><input type="radio" name="q1" value="yes" id="yes1">Yes</label> <label for="no1"><input type="radio" name="q1" value="no" id="no1">No</label> </li> <li>This is question #2<br> <label for="yes2"><input type="radio" name="q2" value="yes" id="yes2">Yes</label> <label for="no2"><input type="radio" name="q2" value="no" id="no2"> No</label> </li> <li>This is question #3<br> <label for="yes3"><input type="radio" name="q3" value="yes" id="yes3">Yes</label> <label for="no3"><input type="radio" name="q3" value="no" id="no3"> No</label> </li> <li>This is question #4<br> <label for="yes4"><input type="radio" name="q4" value="yes" id="yes4">Yes</label> <label for="no4"><input type="radio" name="q4" value="no" id="no4"> No</label> </li> <li>This is question #5<br> <label for="yes5"><input type="radio" name="q5" value="yes" id="yes5">Yes</label> <label for="no5"><input type="radio" name="q5" value="no" id="no5"> No</label> </li> <li>This is question #6<br> <label for="yes6"><input type="radio" name="q6" value="yes" id="yes6">Yes</label> <label for="no6"><input type="radio" name="q6" value="no" id="no6"> No</label> </li> </ol> <button type="button" onclick="sendTest()">Submit </div> <script> var xhttp = new XMLHttpRequest(); function sendTest(){ var myObj = {"q1":"maybe", "q2":"maybe", "q3":"maybe", "q4":"maybe", "q5":"maybe", "q6":"maybe"}; var counter = 0; x = document.querySelectorAll("input"); for (i = 0; i < x.length; i++) { if(x[i].checked){ counter++; } } if(counter != 6) { document.getElementById("proof").innerHTML="ERROR"; return; }else{ for (i = 0; i < x.length; i++){ if(x[i].checked){ myString += x[i].value + ","; } } var myString = JSON.stringify(myObj); } xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("proof").innerHTML = this.responseText; } } xhttp.open("GET", "test5.php?myString", true); xhttp.send(); } </script> </body> </html> The file it calls - test5.php <?php $str= $_GET["q"]; $mine = 'yes,no,yes,no,yes,no'; $corr = 0; $wron = 0; $arr = explode(',', $str); $arry = explode(',', $mine); for ($i=0; $i<6; $i++){ if($arr[$i] == $arry[$i]){ $corr++; echo $corr.' correct<br>'; }else{ $wron = $wron + 1; echo $wron.' wrong<br>'; } } echo 'You have '.$corr.' correct and '.$wron.' wrong.'; ?> I really hope this is a giant help. If not we're always here, sort of.
  19. If you want raw JS: place an id on your <li> Lets say id='myJS' and: document.getElementById("myJS").addEventListener("click", function(){ Put your code here between the curly brackets });
  20. Revolutsio, I see where you have used "this is not my code I found this on youtube" on your questions before. Most YT teaching vids never post code - it has to be copied. If this is how your doing it, please verify your randision before asking for help. Chances are pretty high that the correct code, as was given on youtube, works.
  21. Revolutsio, Before trying to learn PHP you should have a stronger grasp of HTML then you do. I understand your impatience with getting a web site up, but take a weekend to study your coding. I removed the PHP and corrected your HTML. Take a look and see if this is what you want. <th> tags need a matching end tag not </td> TABLES should have <tbody> tags - I added them Your <form> appears at the top so I assume you want it there, but not needed in the TABLE - coded it differently and put it on top. You define only three headers so you only have three columns in the table, It looks like you have five things that you want in the table. $output and $od have no place to go so added an Owned header I'm eliminating $output you can insert it were you want. Your missing a </td> tag. The end of the PHP is hard to find BUT it placed before you really end the WHILE loop. Your also missing the end of your PHP code ?> tag. [code] <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title>Page Title</title> <meta name="viewport" content="width=device-width, initial-scale=1" /> </head> <body> <div id="main"> <form method="POST"> <input type="TEXT" name="search" /> <input type="SUBMIT" name="submit" value="Search" /> </form> <table border=1> <thead> <tr> <th>ID</th> <th>GAME</th> <th>PLATFORM</th> <th>OWNED</th> </tr> <thead> <tbody> <?php $output = NULL; if(isset($_POST['submit'])) { $mysqli = NEW MySQLi ("localhost","root","","***.**"); $search = $mysqli->real_escape_string($_POST{'search'}); $resultSet = $mysqli->query("SELECT * FROM games WHERE GAME LIKE '$search%'"); if($resultSet->num_rows >0){ while($rows = $resultSet->fetch_assoc()){ $id = $rows['ID']; $gn = $rows['GAME']; $pf = $rows['PLATFORM']; $od = $rows['Owned']; } echo "<tr> <td>"; $id echo " </td> <td>"; $gn echo " </td> <td>"; $pf echo " </td> <td>"; $od </td> </tr>"; } ?> </tbody> </table> </body> </html> </form> </body> </html>
  22. mahenda, I don't like frameworks, because straight raw coding can do the same thing usually with less overhead. I the case of forms normal CSS and PHP does a fine job of this. All forms need to be validated and clean up on the server anyway. This the PHP part of my response. Using things like the <input type=""> and the 'required' attribute. Code your form with these and validate on the server.
  23. I use both the BMs in firefox and evernote. If it's a recipe, I copy and paste it to the appropriate section of Evernote
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.