-
Posts
15,264 -
Joined
-
Last visited
-
Days Won
431
Everything posted by requinix
-
If you're using LAMP then everything should be set up for you. You don't need to tinker with any configuration to make PHP work. So undo the changes you made and get yourself back to the original setup that, at least, had Apache up and running. With that addressed, a quick question: what is the URL you see in your browser's address bar when you try to run one of your scripts?
-
You're right, it is a trivial thing that you're missing. (At least, as far as I understand what's going on...) This is probably a good place for the rubber duck approach: Imagine someone is sitting next to you (or find an actual person you can talk to) and explain to "them", in detail, about your username/email input and about the CSS. Pretend "they" don't know much about CSS or HTML. Tell "them" about how the CSS works and how it knows to resize that input. Point out the relevant code to "them" as you go. It should take you a few minutes to do this exercise - any faster means you're rushing through it.
-
So you tried doing something more difficult and awkward and it created more problems than it solved, right? Then don't do that.
-
I don't know what you mean by "change size", but I can't help but notice that you have CSS for type=email and type=password inputs and not for type=text inputs. I'm also going to assume you're already aware that the type=submit rules aren't going to apply to your submit button.
-
When you use URLs like "sub.png", for images or CSS or basically anything at all, the browser will look them up according to the "directory" in the page's URL. Before the rewriting, your URL was like /profile.php?profile=123 so "sub.png" would mean /sub.png. After the rewriting, your URL is now /profile/123 so "sub.png" means /profile/sub.png. Use absolute URLs for these sorts of things: that's with a leading slash, and starting from the root of your website. As in "/sub.png", which will always mean /sub.png regardless of what page you're on.
-
Need Help With mysqli Database Code Not Outputting Anything
requinix replied to nstruth's topic in PHP Coding Help
I like how the comment says "i" but the code says "s". So you dumped out the value of the ID from the form, and it says like string(3) "123", and then you looked in your "crud" table and found a row with id=123? And your code is running successfully, making it to that echo statement, except it doesn't show a value there - and instead PHP actually gives you a one or more warning messages about $result and/or $r and/or the "name" key? -
I think you're misusing inheritance and interfaces, but sure, go ahead and try the RFC process if you want.
-
You've given basically zero details about what any of this is about, or what the application does, or really even what you mean by "certificate". And no, there is virtually never any documentation on how to build the application you want to build. Because it's your application, and you're the only one who knows what it's supposed to be.
-
You cannot catch with type intersection - only a type union, which isn't really a union but more like a syntax meaning "or". If you want a type intersection then use a named class. But in your case, kicken's right: all you actually care about is the Err and its getExitCode method anyway.
-
A password hash will always consist of alphanumeric ASCII characters. You will always be able to save that in your database. The fact that you're saying "if the password has non-alphanumeric ASCII characters then I can't save it in the database" means you're doing something wrong.
-
No, password_hash handles all the work for you. Including salting. Don't do anything extra.
-
Calculating "time since" is giving me a negative (CLOSEME)
requinix replied to Adamhumbug's topic in PHP Coding Help
You mean $time_stamp is that string value? Well, there's your problem. Also, the code you have there just isn't very good. Barand's solution(s) are simpler and make more sense. Might not be helpful to you, but it could be helpful to someone else in the future who has a similar problem. -
"window" is an object. window.close closes the current window because that's what the variable means. If you have a variable for a different window, like one returned by open(), then you can call close() on it.
-
WAMP to IIS, PHP, MySQL - 500 - Internal Server Error
requinix replied to ARP's topic in Microsoft IIS
Those are access logs, not error logs. PHP may be writing its errors (if any) to the same place where IIS's error logs are going. -
WAMP to IIS, PHP, MySQL - 500 - Internal Server Error
requinix replied to ARP's topic in Microsoft IIS
Why are you guessing? Check the server and PHP error logs for why you're getting a 500. -
Passing Variables From Function to Function
requinix replied to Adamhumbug's topic in Javascript Help
You've skipped past one very particular problem: you want an existing menu item's text to reflect something that can change. Using a variable for the addItem's label doesn't mean that you can change the variable's value later and the label will update. You would have to add and remove these items every time the custom-lc is clicked. So the truth is actually that no, the code you've posted doesn't work. Not that you're using it wrong but that it can't do what you want. And I don't see anything in the library you're using that lets you edit menu labels. I'm not sure how you came across that library, but when I search for "jQuery context menu" the very first result is this one, which looks like a much better option given that it's been updated during this year and, you know, it has actual documentation. -
XAMPP for Linux 8.2.4 - could not see javascript file
requinix replied to eaglehopes's topic in Applications
Did you edit any of the configuration yourself? It pretty much works out of the box... and given that XAMPP said the port was already in use means that it was, in fact, running. It's a common thing that even English speakers will do. It annoys me, personally. I was unnecessarily harsh on you for it. I mean more that you (probably) shouldn't be creating this file at all. What is it? Most of the time, someone will do this sort of thing because the file acts as a database instead of, you know, using an actual database (which is the "M" in XAMPP). -
XAMPP for Linux 8.2.4 - could not see javascript file
requinix replied to eaglehopes's topic in Applications
1. You're using XAMPP on Linux? 😆 Just install Apache, PHP, and whatever else you need through your package manager. Normally. 2. It's code. Singular. "Codes" are things you enter into videogames. 3. Don't reference w3schools. Sometimes they tell you the right thing to do, sometimes they tell you the wrong thing to do, and if you're learning then you won't be able to tell the difference between them. Where did you put main.js? /opt/lampp/htdocs/js/main.js? Then the first form you had is correct. If not then (a) why not? and (b) the second form was correct (except "js/main.js" - no ./ - is cleaner and means the same thing), however you might discover problems with this approach... And changing that won't affect any of your PHP code. The thing with file_put_contents is a completely separate issue. That error is telling you that /opt/lampp/htdocs/pages does not exist. It's also a red flag that you're using code to create this filesList.txt file, but I'm going to ignore it. Also, please tell me you're not running this as root. Use your user account - give it ownership of /opt/lampp/htdocs and everything inside it. -
A cover page is just a DIV with a page break after. Headers and footers are harder: HTML and CSS don't really do those. There are hacks for specific browsers that can mostly do it, but really if you need these sorts of things then you should be generating PDFs. Depending what library you use, there may be some special markup you can use to specify a page header and footer.
-
DIVs representing pages is a weird way of doing this. Normally you don't and you just create a regular page... You can use CSS to affect printing, though, such as break-before and break-after.
-
Some searching suggests the Twitch player has to do it itself, but in case that's not accurate, I would try using the FullScreen API triggered by when the screen orientation changes.