-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
Exactly. In short, doing something like that is only preaching to the choir.
-
I feel like people are comparing apples (text editors) to oranges (frameworks) to bananas (CMSs) ...
-
Should be like this... if (empty($_POST['verify'])) { header('Location:createid.php?verinone=f'); exit(); }else
-
I don't think wayne was attacking you specifically, but the notion of not putting a link at the bottom of a page, in general. Having a "powered by/made by/etc.." link at the bottom is actually pretty common for most small/medium sized sites. The only people who don't really do that is bigger companies, and they don't do that because they pay a lot of extra money to not have stuff like that. Which usually involves having everything custom made from scratch in the first place, because a lot of 3rd party stuff requires you to have a link, as part of the ToS/license.
-
so what about 3rd party scripts that are more often than not used? Shopping carts, content management systems, frameworks, etc.. ? Client is not receiving full 100% ownership of those things. I never charge clients for scripts anyways. My fees are always based on $$/hr as far as reviewing/writing/installing/fixing/etc.. stuff. In other words, people pay for my time.
-
ditch the stripslashes.
-
well considering you aren't setting a session variable and checking for it on logged in pages, .htaccess would be better, yes.
-
<?php $strCurrentPassword = "AADDMIINN"; $strPassswordEntered = $_POST['password']; if ($strPassswordEntered == $strCurrentPassword) { header('Location: http://www.mysite/admins.html'); exit; } ?> and make sure you don't have any whitespace before your opening php tag.
-
you are echoing something before your header call. You cannot have any output before headers are sent.
-
sum()
-
I'm not defending the OP, but I really don't understand why you are so upset. Technically, he could paypal you $0.01 and fulfill his end of the bargain. Even more technically, "willing to pay" does not mean "will" pay, nor does it mean what will be paid. Same goes for "reward." He promised a reward, but did not mention what that reward would be. Instead of asking for details or securing anything with him, you jumped right in and helped. He could technically fulfill his end of the bargain by forking over a penny or just saying "Thanks!" ("Thanks" can be a payment, and it can also be a reward). You are obviously not happy with him saying "Thanks!" Would you have been happy if he paypaled you $0.01? I have a sneaking suspicion you would have been bitching just the same. But for what? As mentioned, you guys came to no official, or even unofficial agreement on anything. Again, I'm not defending the OP. But I put this in the same category as people who purposely post in higher volume forums to get a quicker answer, or post in multiple forums, or bump every 2 seconds. I think instead of you getting upset at him about it and demanding vengeance, you should chalk it up as a lesson learned, laugh about it, and get over it. Sorry, but that's just the way it is.
-
$this->wordpress++;
-
It was a simple fix. Thanks for your time. ...
-
more accurately, \b is a word boundary and will match anything not considered a "word" character, as defined by \w. \w being defined as a-z A-Z 0-9 _ and any other characters considered to be word characters defined by local settings. So basically, \b$search_var will match if there is a space before, it, but it will also match if there is any other non-alphanumerical character before it. Also, \b only matches at where you put it. \b$search_var does not match at the beginning and end of $search_var; it just looks for a non-word character at the beginning. If you want it to match at the beginning and end, you would do \b$search_var\b just like anything else. Using \s is preferred, however, note that \s is shorthand for "whitespace" characters, not just a space made from the spacebar. It will also match tabs and newline characters. If you want to only match a space and nothing else, you would use a physical space in your regex: $match = preg_grep("/ $search_var/i", $my_array);
-
he will not "win" this discussion because he's trying to compare apples to oranges. FF, Chrome, etc.. are browsers. Avant is a plugin. It's like calling firebug a browser and comparing it to other browsers. Damn stupid.
-
uh...didn't FF just recently hit the 1 billion mark on downloads? http://news.cnet.com/8301-1001_3-10301013-92.html lol seriously dude, you're like 5 years behind the times..
-
yeah but...I think you missed the part where avant isn't a browser, but some outdated, obsolete plugin...
-
hmm...really stupid or being a troll...hmm... I dunno... I've seen some pretty stupid people around here...
-
we need to create our own award logo and start handing out awards.
-
it prints 'array' because preg_match_all returns an array. And you have more than one author to match. No offense, but if you would bother to take 2 seconds to read the manual entries on these functions, you wouldn't be asking these questions. I know you probably think you're giving it all you've got, but you've got to try harder, because if that's all you've got, you're going to constantly be struggling and maybe programming isn't for you. You can't echo an array, because an array is not the same as a variable. You have to either loop through the array and echo each individual element, or else dump it all out with something like print_r
-
Hard to describe, I am looking for something like 'return' but for IF
.josh replied to cs.punk's topic in PHP Coding Help
Instead of trying to make it go from that place to that other place, I think you need to rethink your structure. You would normally use something like goto but that is spaghetti code programming and is bad practice. What is your overall goal with this? -
that's because file grabs the contents of the file and creates an array where each line is an element. Which you then turn around and go through each line, but then try to preg_match as if it were the whole file, not the line. Just use file_get_contents and the regex.
-
$content = preg_replace('~((?:width|height)\s?[=:]\s?[\'"]?)[0-9]+~i','${1}250',$content);
-
preg_match('~\{AUTHOR\}([^{]*)~is', $file, $matches);