-
Posts
15,274 -
Joined
-
Last visited
-
Days Won
432
Everything posted by requinix
-
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.
-
Answers to my questions would be nice too. "ftpd" is very likely going to be an FTP server. If you need it then you should look into what's wrong, if you don't then you can shut it down. It kinda sounds like the http and https sides are running with different user credentials. Except that's weird.
-
If you haven't already, reach out to the hosting company: clearly something changed while the account was offline and it hasn't been undone. What's the hosting setup? Are there other users on that system, which you could tell by looking in /home for other usernames? Because it seems like there are, yet the save path is /tmp which would be shared with everyone and that's not good. The error names a particular file - does it happen to exist? What are the exact permissions and ownership on /tmp? It should probably be rwxrwxrwt, with that last letter "t" meaning sticky permissions and not "x" like normal, and probably be owned by root:root (and not, say, your own account). When your retry logging in and it works, look at your cookies for the PHP session id, then track it to the file in /tmp. What are its permissions and ownership?
-
Sure, but that won't stop anything - they'll just find a way around it, or do something else. The only solution to spam that actually has any effect is adding a captcha to the form. That's for bots, of course. For human beings, you'll just have to block them.
-
Describe (or draw) what you mean by "a vertically aligned line on either side of the text".
-
Modal will not open. Throwing Uncaught error...
requinix replied to Moorcam's topic in Javascript Help
Then, as before, there's something wrong with this particular modal or its setup. -
Modal will not open. Throwing Uncaught error...
requinix replied to Moorcam's topic in Javascript Help
https://www.google.com/search?q=bootstrap+modal+undefined+backdrop Looks relevant. -
It doesn't fit because it doesn't fit. Because there is too much text to fit in the space available. You could give the element more space, or shrink the font size, or reword it to be shorter, or you could just not worry about it fitting on one line.
-
The part where mac_gyver said that your preg_split()s could be simply explode()s is still true.
-
PHP Template Class Rendering with Arrays/Loops/PregMatch/PregReplace
requinix replied to Solar's topic in PHP Coding Help
This "2D" array is actually just a regular array like everything else, except that the keys are named like "0" and "1" instead of "logos". If I understand the way this works correctly, you should be able to write something like (0)(/name)(/0) to get Steven. If you don't want to write (0) or (1) then you'll have to figure out some new syntax... -
If you can create CSS rules that target mobile devices then you can create CSS rules that target desktops...
-
Opening one Bootstrap Modal from another Not Working
requinix replied to Moorcam's topic in PHP Coding Help
Shot in the dark, but you don't happen to be reusing that second modal's ID for anything else on the page, are you? Can you take the same (partial) markup, stick it into something like JSFiddle, and get it to work? -
Opening one Bootstrap Modal from another Not Working
requinix replied to Moorcam's topic in PHP Coding Help
Does their example work for you? Because if their example works then there's something different... -
Opening one Bootstrap Modal from another Not Working
requinix replied to Moorcam's topic in PHP Coding Help
Have you already compared what you have with their example of how to do two modals? Which worked for me... -
Opening one Bootstrap Modal from another Not Working
requinix replied to Moorcam's topic in PHP Coding Help
Been a while since I've done Bootstrap... Have you tried configuring it to open the other modal without closing the current one? -
But it's the same Pokemon though, isn't it? Someone offers one up for trade and someone else makes an offer on it. Eh, whatever. It makes more sense (and it's easier) to have just the one table, but you can do whatever. Third, the whole point of a prepared statement is that it's reusable. Preparing the same statement inside a loop completely defeats the purpose of that. Create it once ahead of time, then execute it with the different values. Not that you need to do this at all, of course, since that single INSERT...SELECT will do everything for you all at once. Otherwise, I see no reason why it would only do one row. Maybe there's a key constraint getting in the way? Duplicate row?
-
First, question: why even do this at all? INSERT INTO user_pokemon (uid, name, level, exp, move1, move2, move3, move4, type) SELECT (user id here), name, level, exp, move1, move2, move3, move4, type FROM offer_pokemon WHERE tid = (id here) Second, question: why have two separate tables for this? Don't you think it would be easier to have one table and then just mark each row as, like, "pending" or "confirmed"?
-
How do I require uploading images when posting to a blog?
requinix replied to nguyenvanphu's topic in HTML Help
If you "fixed it" but it doesn't work then you didn't fix it. That input type=file can work, I would think, however it will require changing some number of other things - I can't say exactly what since it's complicated and it will depend a lot on other things (which you haven't shown) but it can work. Either that, or go back to what you had before and do what I originally said about using Javascript to prevent the form from being submitted. Again, I can't say exactly how since it depends on things you haven't posted, but the principle is very simple: when the form is being/is about to be submitted, check that there is a value for that cover "file", and if not then stop the form from submitting and tell the user they missed a step. -
How do I require uploading images when posting to a blog?
requinix replied to nguyenvanphu's topic in HTML Help
If you've fixed it then you don't need Javascript...