NotSunfighter
Members-
Posts
63 -
Joined
-
Last visited
-
Days Won
1
NotSunfighter last won the day on April 13 2020
NotSunfighter had the most liked content!
Profile Information
-
Gender
Male
-
Location
Urbandale, Ia
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
NotSunfighter's Achievements
Regular Member (3/5)
8
Reputation
-
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()