ManiacDan
Staff Alumni-
Posts
2,604 -
Joined
-
Last visited
-
Days Won
10
Everything posted by ManiacDan
-
Also, IE isn't saying anything. One of the first things you need to realize is the difference between server-side errors (like this one) and client-side errors (javascript/css errors).
-
Read the error messages. Error message #1: Too many connections. That means you have too many connections. Google for "mysql too many connections," what do you see? You see that you have to increase the value of "max connections" for your server.
-
Pikachu has already started hitting the holiday sauce I see.
-
how to give latest rss feed as an javascript embed to other site ?
ManiacDan replied to linux1880's topic in PHP Coding Help
The RSS feed you already have has a unique URL. Give them that URL. Now you're done. -
The rule is to not use tables for LAYOUT. That means: don't use tables to organize your site, don't use tables to make an image float to the right of a paragraph, and don't use tables to make your header look nice. DO use tables for TABLES. The tag is not deprecated, it's just incorrectly used.
-
webhostingtalk forums as well. What did they do?
-
Not really. He suggested that if the code is used anywhere else that the developer pay a $10,000 fine. Yes...that would be the monetary reward that I said was the only exception. Pika is right, the implication is that the client would pay, since the post said "he agrees to pay." Presumably if the developer were to pay, the post would have said "you."
-
Aside from the monetary reward (the presence of which is debatable), your agreement is identical to what he suggested. A proper freelance contract should state that the developer owns the copyright of the work and licenses a non-exclusive non-transferable permanent irrevocable license to the client for use for the business purpose described in the contract. The product may be modified by the client but not distributed, sold, and revealed to any third parties save contractors under NDAs. Monetary damages resulting from a violation of the contract may or may not be included. Note also, scoot, that even if you retain the copyright to the code, you still may not be able to use the sites themselves as part of your portfolio, because the assets (images, videos, etc) belong to the client. Careful reproducing screenshots of "your code" with someone else's IP in them.
-
I putting the (correct) brackets into your (wrong) query produces what you call the "wrong" results, you might not be understanding what it's trying to do. Right now, your query will return rows if: product = '".$product_name."' AND col_1 !='' OR col2 != '' OR col3 != '' etc. That doesn't appear to be what you want. Also, Thorpe is absolutely right about your design. Either: A) These fields all should be named properly and you just didn't bother for some reason. You should name the fields in this case. B) These fields all hold the same kind of data and you're adding a new numbered column whenever you add more data. You should break these columns out to another table in this case (which would have the side effect of making your query easy)
-
You can't do anything when a user LEAVES a page, only when the user VISITS a page. The best way to do it is what Sergei said: Whenever the user hits that page, put a flag in the session. Then, on every other page (or in the central place where you call session_start), if that flag is set and they're not on the flagged page, that means they left the page. Kill the session.
-
What kicken is saying is: If the user attempts to visit the login page If they are already logged in Don't show the login page, kick them to the index page instead.
-
Prevent what from happening? Describe the problem. Describe your desired solution. Note that dzelenika's solution won't work, since you'll never be able to tell which cookie is which.
-
One of your customers (this one) isn't active. The client portal throws an apache error.
-
Sessions are tied to a specific browser. You can't be logged in as one user in one tab and another user in another tab in the same browser, it just doesn't work that way. What are you trying to accomplish here? What purpose would it serve? Couldn't you just log in as userA in firefox and userB in chrome and be done with it?
-
I'm saying exactly what sasa already said. You cannot put single quotes around column names. There isn't much more I can do to explain that. WRONG: WHERE 'columnName' = 'something' RIGHT: WHERE columnName = 'something' You can also put backticks around column names if you named your columns with reserved keywords: WHERE `desc` = 'something'
-
I still don't know what the hell you're talking about. Without JavaScript, that slideshow will not work.
-
ANY Variable included inside a regular expression MUST be run through preg_quote first. $badWords obviously has parens in it. Also, why are you doing that preg_replace on spacedBadWords? What's the goal there? One space after every letter? Are you sure that's what you're getting?
-
Well this isn't Windows Tech Support forums. The BBC website absolutely changes to the screenshot posted earlier in firefox and chrome with scripts disabled. You're obviously not disabling scripts properly or your page is cached or some other problem with your computer.
-
I get the same page KingPhilip gets. Did you refresh the page as I stated?
-
He's saying: No, you cannot do professional work without learning the professional language or paying a professional. Can you build a house without learning how or paying someone?
-
Again, that's not possible given the OP's constraints. Since everyone continues to give solutions that wouldn't work for the OP, and OP hasn't been here in a year, I'm closing this.
-
$category= (int)$_GET['category']; if(is_int($category)) { } This code is unnecessary. Of course a variable you just cast as an int will be an int. You should check to make sure it's not zero. If zero is a valid value for $category, you shouldn't cast at all and use is_numeric.
-
Sergei, they can't do that because host B has limited bandwidth. The best thing you guys can do is increment a counter and then use a header() redirect to send the user to the file, and hope nobody finds the files directly. Also, you could simply parse the logs on Host A This thread is more than a year old, so OP obviously found his answer already.