scootstah
Staff Alumni-
Posts
3,858 -
Joined
-
Last visited
-
Days Won
29
Everything posted by scootstah
-
You are uploading it through HTTP either way.
-
It "checks" the radio button.
-
I missed the part where you asked a question.
-
If there is a limit on the upload size then it doesn't matter what you do after you upload it. It will fail before it even gets to that point. If you have access to the php.ini file you may be able to increase the limits.
-
Why did you think the upload limit would magically be gone by using FTP instead? You are still uploading a file through a form, and the limit still exists.
-
Google will penalize for duplicate content. So if domain2.com links to the same page as domain.com, you will have negative effects.
-
SELECT MIN(column) AS first, MAX(column) AS last FROM table
-
Make an admin flag in the user table and then just make sure it is set before you let them do anything.
-
Question for Clan Website Developers
scootstah replied to ShoeLace1291's topic in Application Design
You should store results and matches in different tables. This is called normalization, and is the preferred approach. -
When you depend on a file being loaded, like class or function files.
-
Input Devices - Barcode Scanners/ Weighing Machines
scootstah replied to mattspriggs28's topic in Application Design
I'm not sure how your question pertains to PHP, but yes USB scales exist. http://www.google.com/search?q=usb+scale -
Because they both have annoyingly long syntax.
-
Thanks, forgot to remove that after switching the delimiter. Yeah, I had a major derp moment (see my post above).
-
DOH! I'm an idiot sometimes. The issue was that in the process of switching to this pattern instead of more-complicated-than-needed-to-be code, I accidentally removed the assignment of $link. Derp brb more coffee
-
I suck at regex, help me out here. I have a pagination function that will build page links. If no link is given (for pages) then it will attempt to guess what it should be. It does this by assuming the end of the string is where you want the page. For instance, if you are on example.com/news/somearticle, it will assume that the pages should be example.com/news/somearticle/2 Obviously if you are already on example.com/news/somearticle/2 it would then make it example.com/news/somearticle/2/3, which is of course wrong. So I need to strip /NUMBER/ off the end of the URL. Seems simple enough, yet for some reason it is stripping the entire segments all the way back to the domain...so it looks like example.com/2 It works perfectly in my Regular Expressions Tester (a firefox addon), so I'm not sure what gives. $link = preg_replace('~\/?\d*\/?$~', '', $link);
-
If you know one or 2 languages, then you know them all??
scootstah replied to OM2's topic in Miscellaneous
Programming is a process that needs to be learned which is separate from the language. It is a unique way of thinking and problem solving. Once you master this, programming in any language is mostly about learning the API and unique quirks/methodology. This doesn't mean that if you master one language that you are Yoda of programming. Every language is a little bit different and still requires sufficient time to learn and become familiar with. -
This should be in here: http://www.phpfreaks.com/forums/index.php?board=107.0 Post what you are using for a cart system and relevant code and you will get a better response.
-
Trying to find a way to create a key system
scootstah replied to proxikal's topic in PHP Coding Help
If you want their script to hit off yours and the host doesn't allow it, then you can't do it. You could always go the other direction. Have a script that returns the key when you go to it and then use cURL on your end to go to that script. That's about as good as you're going to get. Just remember that you will never be able to truly make a closed source PHP application. Anyone can just remove whatever attempt you make at doing so. -
Can we see where $image came from?
-
Query matching multiple columns in multiple rows??? (serialized data?)
scootstah replied to Jim R's topic in MySQL Help
I didn't notice it was WP. Good luck with that bundle of joy. -
Why the {1}? You already have the dollar sign to indicate only the end of the string so no repetition criteria is necessary. @John_A: It may not be clear, but with scootstah's replacement solution you do not need to test if there is a -[digit] before trying to remove it. Just run the preg_replace() to remove the -[digit]. If it does not exist it won't be replaced. So, testing for it is a waste of code. For what it's worth, I would use this expression: $str = preg_replace('/-\d$/', '', $str); The \d is a character class for digit. My regex is mediocre at best. Thanks for the optimization.
-
Query matching multiple columns in multiple rows??? (serialized data?)
scootstah replied to Jim R's topic in MySQL Help
You should be splitting that data into separate tables instead of serializing it if you wish to perform searches and whatnot on it. It is loads more efficient for the database. -
Pretty much all of these free login tutorials have no security in mind whatsoever. So I would be cautious using them. From what I can tell the password does get an encryption and the tutorial allows for pages to only be viewed by users with the right user level. I am not saying that it would be the most secure thing to use and I would by no means use it long term but as a starting point to have a look at and play around with I think its OK. Saying that 'scootstah' has a point and most free tutorials are really only there as a starting point, not to be used as the final thing. At any-rate I hope it helps. I see what you're saying but I still think it is a waste of time. You will spend all that time learning a tutorial that you will then dump and move to something else, when you could have just started with the something else and learn it right the first time.