Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by NotSunfighter

  1. It doesn't. OP was the one who used 4 integers. But there is also $inm = "Bio Clean green500ml"; $cnm = "INSECTS KILLERS"; $bnm = "HARPIC "; to expand that number significantly.
  2. This is my take on things and it does throw an error is an input is null: <?php $inm = "Bio Clean green500ml"; $cnm = "INSECTS KILLERS"; $bnm = "HARPIC "; echo SKU_gen($inm, $cnm,$bnm,20).'<br>'; function SKU_gen($pname, $cat=null, $brand=null, $id = null, $l = 2){ if($pname == null) echo "empty<br><br><br>"; $result = ""; if($pname == "Bio Clean green500ml"){ $result = "BI-"; } else{ $result = "XX-"; } if($cat == "INSECTS KILLERS"){ $result = $result."IK"; } else{ $result = $result."XX"; } if($brand == "HARPIC "){ $result = $result."HA"; } else{ $result = $result."XX"; } $num = 10000 + $l; $result = $result.substr($num,1); if (strpos($result, "XX") !== false){ echo "There is an error: ".$result; }else{ echo $result; } } ?> with a lot of products I'd use switch statements instead of the if then statements.
  3. I have used wamp since to early 2000's. It was hard to install then. I have installed it on every new computer (about once every 2~3 years) and have had no problems, maybe cause I know what I need or where to get the information. I have never figured out how to get xamp up and running. You'll need to google the pros and cons. A;; I can tell you is wamp is larger then 4x. Code is code so portable.
  4. Clean up your code. You have 6 </html> and combine your javascript into a single file
  5. It just might be the browser, and that might not be fixable. Add this to your CSS temporarily and see were the bottom line is: body{ margin:0; padding:0; outline: 1px solid red; }
  6. I have never seen so much code to do a simple drop down menu. It looks like your using bootstrap, ssas, and jquery. Lets start there: learn to code. Learn HTML, CSS, and JavaScript! Then, if your doing a lot of programming and haven't made a personal library you can learn jquery. When studying HTML pay close attention to CSS-Grid and FlexBox. Oh don't forget responsive design. Sorry I can't help. Don't know where you originally hide the menu list. That is what I believe is your problem, you don't hide it on page start up.
  7. Dharmeshdhabu, neither of the two code samples you posted relate to the question. The first is totally useless and the second is for installing info into a database. I shall comment on the second, longer code. It's a shame SESSIONs are used to just send a message to the user and not protect data. But that may be all you need. So this is just my BS, don't worry about it. But here are two things that you should worry about You never call the function "test_input" before you insert data. I should be called before the INSERT and both UPDATES. It should be removed from the "if (isset($_POST['admit'])) {" and made to stand along. You initialize variables for the first admit of a patient, but not for "$Treatment = $_POST['Treatment'];". Be consistent. "$results = mysqli_query($db, "SELECT * FROM IPD ");" $db is never defined and where does the $results go? This might be your problem: PHP is case sensitive. You insert into IPD, but UPDATE ipd. Always use lower case for DB and field names.
  8. z-index only works on positioned elements (position: absolute, position: relative, position: fixed, or position: sticky) and flex items (elements that are direct children of display:flex elements).
  9. Here a solution from Stackoverflow <!DOCTYPE html> <html lang="en"> <head></head> <body> <script> var permArr = [], usedChars = []; str = [5,3,7,1]; function permute(input) { var i, ch; for (i = 0; i < input.length; i++) { ch = input.splice(i, 1)[0]; usedChars.push(ch); if (input.length == 0) { permArr.push(usedChars.slice()); } permute(input); input.splice(i, 0, ch); usedChars.pop(); } return permArr }; document.write(JSON.stringify(permute(str))); STACKOVERFLOW </script> </body> </html>
  10. You need to generate an HTML page with an INPUT for the user generated string then use a JAVASCRIPT function called Ajax to transfer user input to your PHP function and transfer the permutations back to JS to show them.
  11. Updating your HTML/CSS may or may not be easy, but we need to see it. If it is complicated upload it to a free host 000webhost might work https://www.000webhost.com/ You can try your PHP there also. How did you check your php before. Did you use something like Webampserver? It probable is OK.
  12. What do you mean by "script id"? Never heard of that even in wordpress.
  13. Where are the folders your using? Where is the main html file and what is it's name? Have you made a file named "css" and placed that file in same location as the html file? Have you placed your css file into the css folder?
  14. @steveb1471, This is way more complicated then it should be. I see a hard time ahead maintaining this with uodates or repairs. IMHO I'd use AJAX to communicate this your PHP and DB. storedata() works with sessionStorage and has nothing to do with communication and adds extra steps to what your doing. The SELECT should be user INPUT, because it needs to be upgraded by a programmer when new weeks appear. The worst thing I see is the unneeded use of FORM to talk to PHP. Ajax does this nicely and will open a POP UP BOX and display your information without ruining the HTML page. Please consider AJAX.
  15. I would like to see the JavaScript => storedata()
  16. Your column headers are being generated inside the while loop. Move them to outside the loop so they only generate once. The <td> <inputs> should be left in the loop.
  17. Off the top of my head and not testing the idea; I would just add a comma to the 'var taggedPerson'.
  18. Either of the last two codes are OK, but I would use the first one and set the value of the first option to nil: <option value="">Select here</option> and not a space. Question: If this is a yes/no thing why not use simple Radio buttons
  19. Shouldn't those double backwards slashes \\ be single \ ?
  20. I don't see anything in your code to cause a problem. I'm sure it lies in your PHP file. Post that code. Also you can save load time by removing the two JS scripts, they are needed.
  21. 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.
  22. 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?
  23. 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.
  24. Sorry for the intrution, but the line above that: while ($row = $res->fetch_assoc()) { Has NO ending bracket
  25. 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.
  • 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.