NotSunfighter
Members-
Posts
63 -
Joined
-
Last visited
-
Days Won
1
Everything posted by NotSunfighter
-
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.
-
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.
-
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.
-
Clean up your code. You have 6 </html> and combine your javascript into a single file
-
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; }
-
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.
-
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.
-
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).
-
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>
-
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.
-
What do you mean by "script id"? Never heard of that even in wordpress.
-
Css is not working without clean and close tab
NotSunfighter replied to CodingStudent's topic in CSS Help
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? -
@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.
-
I would like to see the JavaScript => storedata()
-
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.
-
Off the top of my head and not testing the idea; I would just add a comma to the 'var taggedPerson'.
-
Was This A Php Issue Or An Html5 Drop Down Issue ?
NotSunfighter replied to 2020's topic in PHP Coding Help
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 -
Shouldn't those double backwards slashes \\ be single \ ?
-
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.
-
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.
-
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?
-
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.
-
Sorry for the intrution, but the line above that: while ($row = $res->fetch_assoc()) { Has NO ending bracket
-
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.