-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
"overtime" in this context means working over 32 hours a week if you are classified as a "part time hourly" employee, or over 40 hours a week if you are classified as a "full time hourly" employee. It's something like 50-55 hours a week or something like that if you are classified as a "full time salaried employee" (it is a common misconception that your boss can work you 24/7 if you are on salary) and also I think if you're <=16 yrs old in some states over 20hrs a week constitutes as "overtime." And what that means is any amount of time you work past those hours you are supposed to by law get paid anywhere from 1.5-2x your current wages.
-
But it will still be BYOB.
-
There's already a thread about bing here, that was just made yesterday. Thread closed. edit: http://www.phpfreaks.com/forums/index.php/topic,254766.0.html is the thread
-
I've been thinking about putting serious effort into blogging for a while now. I have this delusion that people will actually be stupid enough to read it.
-
[SOLVED] Redisplaying a drop-down menu choice...
.josh replied to fr00tloops's topic in PHP Coding Help
it depends on how you have the dropdown coded. Does it go through a loop displaying options from some query or something, or is it hardcoded? If it is hardcoded, you need to make it looped by at the very least putting it into an array and looping through it. That way in the loop that displays it, you would put something like this: $selected = ($_POST['fieldname'])? "selected='selected'" : ""; echo "<option value='...' $selected> ... </option>"; -
group them in subfolders so you aren't having to have them all loaded at once. get more ram.
-
I also have to say in microsoft's defense (or more accurately, a statement against google), that more and more google is kicking organic search ranking to the curb, in favor of paid advertising (something that article touched on briefly). A lot of posts/blogs/articles I've read say that this is going to ultimately hurt google, as people want relevant search results, not rigged searches. I'm still on the fence on this though. On the one hand, I can understand that PoV but on the other hand, I have to think that if I'm wanting to spend money at some site on the internet, which sounds more secure, some random site with high organic search ranking, or someone willing to be tied into an established entity and pay for their position? So in that respect, I'm not so sure bing is going to necessarily win over search users simply because it (claims to) is going to focus more on organic search results.
-
Okay now I'm confused. Maybe this is my nubness showing, but what is supposed to be the difference between MSN search and bing? Is bing supposed to eventually replace MSN search or something? The "next step" to MSN search? If I go to msn.com, right under the search field, it says "Search on MSN just got better with Bing. See how". So if MSN already is already getting a piece of the pie so to speak, then that kind of extends to bing. So I'm thinking really bing is about getting a bigger piece of the pie. edit: also apparently when you go to msn.com and do a search, it actually brings up the bing page. So I guess that pretty much answers that.
-
so I was doing some random searches with bing and did for instance "php glob" and it is returning results for every single language version of it from php.net. I guess it is not yet smart enough to filter stuff like that :/
-
I didn't think you were being a smartass. I was just clarifying the intention of my post, as it seemed to not be clear. error #1) $text.=strip_tags('allowed tags'$text); That is incorrect. stip_tags requires 1 argument, and an optional 2nd. As it stands right now, you have a string 'allowed tags' mashed together with a variable $text. That's what you are getting your first error from. I'm going to assume you just want to strip all tags from $text, so it should be like so: $text.=strip_tags($text); If there were some tags you do wish to allow, that's where the 'allowed tags' argument comes in, but it should look like this: $text.=strip_tags($text, 'allowed tags'); arguments should be separated by a comma. Also, you would actually want to replace 'allowed tags' with the tags you want to allow. For instance, if you want to strip everything except anchor tags, you would do this: $text.=strip_tags($text, '<a>'); error #2) The part in red is your problem. You have a closing bracket for your if statement at the top there, then you have an expression (the str_replace), then you have an else. The else needs to come immediately after the closing bracket. I'm going to assume that the str_replace is supposed to be inside the 'if' condition so it should be like this: /*Sending Email*/ if ($valNoBot == "ihateubot"){ $to = "[email protected]"; $subject = "New Contact"; $message = "Form1 Information \n\nFirstname = $firstname\r\nLastname = $lastname\r\nphone number = $phone\r\ncell = $cell\r\ne-mail = $email \nmessage = $comments"; $from = "$firstname $lastname-$email"; str_replace('.','',$from);//replacing dots with nothing } else {
-
conditions are not terminated by semicolons. Conditions use { } brackets to mark the beginning and end of what you want executed if they evaluate true. But, if you are only wanting to execute one expression if it evaluates true, you don't need the { } brackets. Examples: if (condition) expression1; // will be executed if condition is true if (condition) { expression1; // will be executed if condition is true, same as first one } if (condition) expression1; // will be executed if condition is true expression2; // will be executed regardless of whether condition is true or not, as it is not tied to the condition if (condition) { expression1; // will be executed if condition is true expression2; // will be also only be executed if condition is true, since it is wrapped inside the brackets } So technically, you could have written your code like this: <?php if(setcookie("pam","Pamela is great")) echo "The deal is done!"; else echo "No cookie for you!"; ?>
-
As far as your error on line 25 (a different error than your previous one), it's because you have no closing bracket for the "if" statement that goes along with that "else".
-
no, I wanted you to follow the link to the manual and read how to format the arguments correctly.
-
I am nowhere near expert on flash but I would assume that it would send the same headers as any other language sending a request (ie- AJAX), and the data itself would certainly be the same. In general though, the client will not know that content has been updated unless it makes a request to the server, and that's all there is to it. Not really a java dude either but if you're able to make an applet that can open a socket, then that might be more efficient. Actually, now that I think about it, I vaguely remember possibly reading somewhere or other that more recent versions of actionscript might actually support using sockets. Regardless though, I still say "might" be more efficient, because it's a trade-off. You have a persisting socket instead of a one-time-use socket (which is pretty much what an http request is) yes, but then you have to do a lot of extra work to ensure data is being sent/received properly, in the right order, etc... or else you will end up with a big mess on your hands.
-
Well if you did that on purpose and WANT your email hardcoded there, then why did you turn around and post code putting $_POST there? It makes me think you're either lying or don't know what you're talking about. Are you.... a) wanting to send it to the same email (your email) no matter what? ---> Assign your email address to $my_email like you claim you did (initially): $my_email = "[email protected]"; // or wherever b) wanting to send to whatever you specify in that first "Email address" input field in your form? ---> Assign it the posted var like I said (exactly like that, no changing anything): $my_email = $_POST['my_email'];
-
yes, it needs to constantly send a request for updated info, but you have to do the same thing with flash.
-
$my_email = $_POST['my_emai herel']; your form has an input field with the name of "my_email" and the form method is "post" so when I put $my_email = $_POST['my_email']; That's exactly how it should appear. I assumed that that's how it should be, seeing as how the variable is coincidentally named the same as the form input field name, and you don't seem to be making use of that field anywhere else in your script... But you are saying you had your physical email there, so I'm going to *assume* that that wasn't the problem to begin with.... right?
-
The point of AJAX is to not make a request for an entire page, so you wouldn't have the "annoying refresh." There's only really 2 reasons why you would choose flash over AJAX based: 1) if you are wanting to really indulge with the graphics, 2) avoid issues with javascript being disabled. But, people could just as easily not have their browser set to run flash apps, so that kind of counters #2, so overall it really boils down to how heavy you are looking to make it, graphically. The back-end (php) would be virtually the same either way, so its a question of whether you want to learn the js/AJAX way or the flash way.
-
strip_tags
-
well I c/p'd your code and changed that line to my email address and it sent it just fine. So... p.s.- judging by the context of your email body I suspect what you are wanting to do is this: $my_email = $_POST['my_email'];
-
13 posts before code was posted. That must be some kind of world record. Stupid question: $my_email = "myemail"; you just changed it to "myemail" for the purposes of posting here, and that is not what you really have in your code, right?
-
well what do you expect from a php community? If you're worried about getting your question answered on a javascript forum on a php community, go to a javascript community and ask your question.
-
This is obviously not a php issue. Moved.
-
move it outside of a publicly accessible directory. change the chmod on it.