-
Posts
15,227 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
What kind of variables do you want? Where did they get their values?
-
I thought you said that you wanted to expand a node after filling in the tree. That isn't an event: you have code to fill in the tree so add a bit of code after that happens to expand the node.
-
It's weird you mention that because the very same documentation you couldn't find says that's exactly what you're supposed to do. Could it be that your question isn't so much "how" but rather "why does this method call not work"? Where are you putting that code? Where did "node" get defined? Any errors in the browser's console?
-
someone show me why this code doesn't submit data into my db table
requinix replied to simbae's topic in PHP Coding Help
You've fixed things but you haven't fixed things. Like these: if(isset($_POST['d_name'])){ } if(isset($_POST['manner_death'])){ } if(isset($_POST['place_death'])){ } if(isset($_POST['nok'])){ } if(isset($_POST['rel_nok'])){ } if(isset($_POST['morgue_att'])){ } What are those doing? Nothing. They don't do anything. Then you have if(isset($_POST['tag_num'])){ if(isset($_POST['treatment'])) The first line makes sense, but the second? Without a pair of { } then it will only run the very first line of code that comes after: the assignment for $d_name. Then in your query, $query = "insert into data ( d_name, manner_death, place_death ,nok, rel_nok, morgue_att, tag_num, treatment) values ( '$d_name'.'$manner_death','$place_death','$nok','$rel_nok','$morgue_att','$tag_num','$treatment')"; you managed to fix the one syntax error but you created a new one. You cannot create websites by putting code in your editor and hoping everything will work. You have to make actual, conscious, deliberate decisions about the code. You have to know what different pieces of code mean. You have to understand why code is what it is and then how you can use it to accomplish what you want. So before you try to write more code, stop and take a few days to learn what you can about PHP. Then come back to this file and put some thought into each line of code in it. -
someone show me why this code doesn't submit data into my db table
requinix replied to simbae's topic in PHP Coding Help
I don't know what my code would look like because I don't know anything about your application. The first problems to solve are the ones that are quite visibly wrong. Such as how you have a couple lines of PHP code that aren't within the <?php ?> tags. And those crazy if statements ginerjm mentioned. And the syntax error in your INSERT statement. -
someone show me why this code doesn't submit data into my db table
requinix replied to simbae's topic in PHP Coding Help
I count thirteen problems with this code. Throw it out and try again. -
Can someone please tell me how to do this?
requinix replied to gankonghwa's topic in PHP Coding Help
What have you tried so far? -
Exactly what is he saying you should do and what are the reasons for it?
-
How to display something else if query is empty?
requinix replied to JamesWood's topic in PHP Coding Help
You already have something that will print information if it's available. What's more, it makes sense: if you have $iptc data then print what's in it. Logical. Obviously, that then means that if you don't have $iptc data then it won't print. Also logical. So then, if you don't want it to print anything, you need to make sure that "you don't have $iptc data" is true. Thoughts on how you can make that happen? -
Delivery App like foodpanda technology
requinix replied to nitiphone2021's topic in Application Design
Your question is "How do I make a food delivery app like foodpanda" and no, that's not really a good question. It's not the kind of question that can be answered to any reasonable sort of degree. Do you have maybe some specific questions? -
Problem retrieving data using jQuery AJAX request with PHP proxy
requinix replied to aemann2's topic in PHP Coding Help
Have you tried adding code to check for and handle errors? Especially when it comes to the stuff using cURL. -
How to Webhook data process and send back to my application?
requinix replied to muthumahendran's topic in PHP Coding Help
-
Convenience, mostly.
-
In Docker-land, Find the Docker image for the operating system Configure the image with appropriate settings Copy the source files to /var/www/mywebsite Install other services Install other services Test the image Drink a beer That there is the process you'd follow to create one of those monolithic Docker images that can do everything you want. What kind of instructions would result in multiple images for discrete services? Download the operating system ISO image and create a bootable USB Go to the garage Boot one computer from the USB and configure it for Apache Copy relevant files to the appropriate Apache location Boot another computer from the USB and configure it for PHP Copy relevant files to the appropriate PHP location Boot a third computer from the USB and configure it for your database Maybe run initialization SQL statements Make sure all the computers can talk to each other Go back to the office and browse the website as hosted on the Apache server Those three computers can translate into three images/containers running on one Docker host. Through Docker Compose, you have all three running and talking to each other. Either (a) you have multiple Dockerfiles for the multiple images, or (b) you use buildkit and have one Dockerfile with multiple stages for the multiple images: Image #1: start with the Apache base image, add/copy appropriate Apache and website configuration (remembering that it will be accessing php-fpm across a virtual network), and copy only the files that Apache needs. Image #2: start with the php-fpm base image, add/copy appropriate configuration, and copy only the files that PHP needs. Image #3: start with whatever database base image, add/copy appropriate configuration, and copy any files it might need. Those will embed your files directly into the image - that's for a real deployment because you don't need to change any files. (If you did, that would be handled with an external volume.) Locally, you don't want files right into the image because that's a hassle, and instead you would use volume mounts so that you can develop outside of Docker and immediately get the changes inside your running container. For the Apache image, your Dockerfile would have something like: FROM whatever base image COPY your general Apache configuration files to the places they need to go COPY your website virtualhost configuration files to the places they need to go COPY whatever public assets and other such website files to the places they need to go ...and that's about it, because the base image will (should have) taken care of most annoying things from installing Apache its dependencies to getting you a reasonable default configuration that you might not even need to change. php-fpm has a little more because the base image isn't everything: FROM whatever base image RUN commands to install additional extensions/features not already provided COPY configuration files COPY source files RUN potentially more installation commands, eg. a composer install The database: FROM the right image, COPY configuration files. In terms of a file hierarchy, yours could look like /apache - Apache-related files /website.conf - virtualhost configuration /public - the web-accessible files that go in the Apache image /index.php /favicon.ico /src - PHP source code /sql - database stuff /vendor - only exists locally, isn't added to the image but instead created by a composer install composer.json Dockerfile (if using multiple stages, or else the multiple files would go elsewhere) docker-compose.yml - for your local development, has the three services with volume mounts and networking setup and so on
-
Maybe tutorials aren't going to be the best way to go about this. Let's say you're starting with a blank computer and you have a USB stick with your site's files. What do you need to install? Where do the files go? Be as precise as you can.
-
Sure sounds like a possible culprit. Have you looked into that yet?
-
"Somehow getting blocked" is a hard thing to understand when I can't see it happening for myself. Right now, all I can tell is that if I try to log in with a bad username and password then I get a 500 error.
-
It's not something you can control so as long as things work then there's no point worrying about it. Ditto. Try an earlier version? It's the Alpine version of apt/yum/dpkg. You should almost always chain commands in a RUN with && instead of semicolons: a failing command in a && chain will abort everything after and report the error back to Docker, while a failure in a semicolon chain won't stop further commands and it won't report failure to Docker unless it's the last command.
-
Delivery App like foodpanda technology
requinix replied to nitiphone2021's topic in Application Design
-
Cookies are easy to troubleshoot: use your browser's developer tools to see exactly what Set-Cookie headers your server is sending back, what the cookie data being stored inside your browser is, and whether there are outgoing Cookie headers to your server. Also, 1. Your loggedIn cookie has the wrong value. I assume that's just a mistake in your post and not true for your real code? 2. 36*24 is 14 minutes. Are you sure you want that? The Secure attribute only means that the cookie will not be sent over insecure connections. If your whole site is secure then this won't do anything - but it is still a good idea for security, Just In Caseā¢.
-
Do not use an ID to identify the buttons. Find another solution. Consider learning more about HTML while you're at it. Hint: the best solution is something that you're already using elsewhere in the markup. Oh. And please don't solicit help through PMs.
-
Looking closer at the specifications, they still allow the browser discretion on exactly where to cut. Everything talks about how to handle trailing line whitespace but not much on leading line whitespace. So far I can't see a way to do it with CSS. I would settle for the current behavior and just let it wrap even if not exactly at 43 characters every time.
-
<button id="botaoPrint" IDs must be unique on the page. If you want more than one print button then you cannot use IDs for them.
-
You've said that you have a problem but you haven't said what the problem is.
-
What's the rest of the CSS? Are you sizing it at 43ch wide? Given it a better line-height, like 2ex? Eliminated margins and paddings and borders (or changed sizing model) that will mess up width measurements? Because it sounds like your problem isn't so much where line breaks happen but how you're sizing the textarea.