-
Posts
15,293 -
Joined
-
Last visited
-
Days Won
436
Everything posted by requinix
-
.htaccess files are for people who can't modify server configuration. Can you? If you can then you should be putting stuff into the VirtualHost definitions - you'll get slightly better performance that way. And it would also solve your problem as you'd be putting the Romanian rules in the main site config and the English rules in the en subdomain site config.
-
Yup. Which means it's not executing. Did you put this code into a file with a .php extension?
-
You have code that is able to get their location. You need to take that location data and put it into the link at that time - you can't put it in there ahead of time. Take a look at MDN's geolocation examples for something that's actually very close to what you want to do.
-
PHP cannot interact with the card reader. You'll need Javascript and/or some sort of client-side browser extension to read information from the card, then you can submit that data to PHP just like if it was a form that the user was filling out.
-
You can flatten the first array with array_merge and the ... operator. That gives you an array of size 11 and will keep the same ordering. Then use array_combine to create a new array using one of them for keys and the other for the values... is what I assume you want.
-
"Merge in order" how? What's the output you want to get? Spoiler: the answer is probably going to involve some combination of array_combine, array_slice, and/or array_merge.
-
It's possible to do, but actually this is more like a demonstration of my point that you don't need it to make that work. But that's just a detail. The scrollbar thing is as described: go ahead and make the text go off the screen, then set overflow-x on a parent element to hide it. If that's not working then please go ahead and just post that link.
-
What part of the page are you talking about? The "322GW" at the top? Yes, it isn't absolute positioning. It's simply a <body> with overflow-x and a descendant element (a heading inside a div inside a div inside a div...) whose text content is overflowing out the side. The positioning is done (using grid) by splitting the "row" in half, with the image on the left and the text on the right. The text's font size was chosen such that it's able to fit the text on the screen normally (the text is known to be a short string like "322GW" or "222"), and there appears to be a little bit of responsive design involved, but collapsing the page enough will eventually cause it to overflow.
-
XHTML? No, this is just regular HTML... <header> elements are HTML 5 replacements to writing stuff like <div class="header">, which means things like browsers and screen readers can more accurately understand the nature of a page. That means they're geared towards content, not metadata. Which means they belong in the document body. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header
-
Absolute positioning is a double-edged sword. It does make sense in a number of situations, and is even the "correct answer", but there are a number of other situations where it isn't a good idea and the design should be done through choices in layout instead. I'm not really sure what the goal is because making text go off the side of the screen seems weird, but I'll throw out something: have you considered using screen-relative measurement units (like vw/vh) with things besides the width? Like, you can apply it to font-size (but be careful about that), or margin-left.
-
Nah, it's fine. As long as it's okay with you, "here is my site, please help me understand why it's not working" is totally a reasonable thing to do. Absolute positioning? Oh, that could be a problem. Really should avoid that whenever possible.
-
If I modify the example to push "Design" off the right edge, I get the horizontal scrollbar. If I set overflow-x:hidden on the body, the scrollbar goes away. So that's working as expected. Can you add more to the example? Like these images (or placeholders of) and containers you're working with?
-
Can you demo this somewhere like jsfiddle, if it's not already visible somewhere? You should be able to resize your browser to mobile proportions to trigger the effect, or if you're using... dated design practices, enable its "emulation mode" or whatever to simulate a mobile browser. The scrollbar will be not just because of content but because of bounding boxes: if you have content way off to the side, overflow-x can hide the content, but that won't matter if the element isn't bound by its width such that it actually has overflowing content.
-
What we need to know is that. To be blunt, we can't help you solve a problem if you don't tell us what the problem is. I'm guessing that when you say "it is never sent", you mean "I always receive the 'there appears to be a problem with the form' message even when I fill out all the fields"? Three things: 1. Only one <form> can be submitted at a time 2. Only the fields inside of that <form> will be included in the submission 3. When you click a submit button, its parent <form> is the one that gets submitted - if there is one For the record, the actual rules are a little more complicated, but the above covers most situations. Including this one. Considering the above, it should make sense you don't get any data: the Submit button isn't in a form at all, but if it was, you've split the fields between multiple <form> elements. Form elements don't have any meaning when it comes to (visually) designing a page, so you can put them anywhere you want. Have one single <form> that covers the entire form, with all the fields and the submit button. Use it to "wrap" the entire application form.
-
It'll be hard to tell you what you've done wrong without a description of what's happening...
-
What is your code, what output do you expect to see, and what output do you actually see?
-
URL rewriting has nothing to do with CORS. What error are you getting? Are you using different domains for some files?
-
When you do stuff with SimpleXML, by default it starts in the "" namespace. But your XML doesn't use the "" namespace. It uses the "http://www.finavia.fi/FlightsService.xsd" namespace. Set up that namespace with XPath using registerXPathNamespace(), then try querying it with a namespace prefix. // prefix can be anything, xmlns URL is what matters $xml->registerXPathNamespace('f', 'http://www.finavia.fi/FlightsService.xsd'); // names need an f: prefix $otsikot = $xml->xpath('//f:flight[f:fltnr="AY456"]/f:acreg');
-
So you want the user to see "Volvo" as the option, but have something in there that shows "Car choices" alongside it? Use an optgroup, then add some Javascript to copy the selected option's parent optgroup label to some other element that's useful. Or go with a fancy dropdown element/library.
-
how to hide data behind the = (page.php?id=xx) for the user
requinix replied to wildware's topic in PHP Coding Help
...with the unfortunate downside that a user can simply add an ?id to bypass the "verification" this process tries to add. Side note: adding arbitrary data into the session is generally not a good idea. -
how to hide data behind the = (page.php?id=xx) for the user
requinix replied to wildware's topic in PHP Coding Help
Assuming that the user ID is not supposed to be for the current user, If ranklist.php needs to know which user ID to show then there is no way to hide that information from the user. If you don't want to show the information then make ranklist.php decide whether or not to show the information. It should check the current user, decide if they're "allowed" to see other users, and if not then give an error or redirect away or something. -
What is your code for this site? It's not behaving correctly, and I suspect you're using session variables for something that shouldn't be using session variables. What I see is that the first visit to your site redirects me to /?i=1 and the home page, then I click About and go to /index.php?page=about, then when I try to go to / (or /index.php) I continue getting the about page. That happens for the last page I visit, whichever page that is. That is what the SEO tools has detected.
-
So, what, is the SEO tool hallucinating that you have duplication? If it says there is duplicate pages then it should also be telling you what pages are the duplicates of each other. What you're doing is claiming that the canonical URL for a page is like /about.php. As far as I can see, URLs like that do not work. So this is going to create problems.
-
Read up on what Composer is and does. You don't need shell access on your host to make use of it.