ManiacDan
Staff Alumni-
Posts
2,604 -
Joined
-
Last visited
-
Days Won
10
Everything posted by ManiacDan
-
Encode them properly with htmlentities
-
Then $devices isn't being set like you think it is. Use something like file() or file_get_contents() instead of fgets with a line limiter.
-
Remember back when I wrote my first post and I put "check if $_POST['close'] is set"? You actually need to do that.
-
There's a number of stack overflow threads on this question already, none of them have a good solution. As you stated, the browsers already have this built in. Why do you need to duplicate that functionality? Just print "Press Ctrl+ or Ctrl- to zoom" wherever you wanted to put these controls.
-
Ok, 1) He's saying the script you posted contains fatal PHP errors and will not execute or even parse. The script you posted cannot possibly be echoing and sending emails, because it will not run in the form you gave us. 2) You run an insert statement without running your arguments through mysql_real_escape_string. 3) You have a query you believe is failing and you're not echoing (a) the query, or (b) the results of mysql_error(). Learn to help yourself and you'll be a much better programmer. You have 2 error checking steps you have not performed.
-
Your variables are randomly named with single letters, I'm not going to bother trying to figure out what you're thinking. Don't do move_uploaded_file if the validation fails. That's the only answer you'll get from me. It looks like maybe $k is what you want.
-
Are you looking for some solution other than the greater-than operator?
-
Referencing a table twice in a row with 2 different ID numbers
ManiacDan replied to VoodooJai's topic in MySQL Help
You can alias a single table however many times you like: SELECT * FROM Table1 JOIN Table2 AS alias1 ON table1.id1 = alias1.id JOIN Table2 AS alias2 ON table1.id2 = alias2.id' //etc. -Dan -
the slideshow effect leaves lines on the images (chrome 16.0.9 under linux). Otherwise, nice.
-
$row is an entire row (meaning array), you'd need {$row['id']} or something similar, but I don't know what your query/table looks like.
-
Basic steps: - Wrap the entire table in a form tag - Name all your checkboxes name="close[123]" where 123 is the ID of the row it's on. - At the top of this page, after you connect to the database but before you select the rows to build the table: > Check to see if $_POST['close'] is set. > $query = "UPDATE thisTable SET closed = 'Y' WHERE theTableID IN ( " . mysql_real_escape_string(implode(',', $_POST['close'])) . ")"; > (handle errors) - Fetch the rows from the table and display as normal.
-
You need to use javascript/ajax for this if you don't want to load all this data before the page is rendered.
-
The only reason do split into two servers is to alleviate load problems (or for some very obscure security reasons). If you don't have any load problems (which you shouldn't at 1 query every 6 seconds) then you don't need to split them. Splitting unnecessarily will actually hurt, since you'll be increasing your page load times waiting for DB connections across the network.
-
Now that your menus no longer float, the auto-scroll should be removed. Visiting a new page should start at the top of that page unless there's a good reason to believe people don't need your headers. Browsing your site is "click. scroll up. click. scroll up. click."
-
Are you following the advice of that reddit thread? If so, good work. Either way, this looks like a nice site. You need to trim down the size/loading time of that club sandwich image and put something in the footer. Also, there's some kind of debug popup that appeared for me when the page finally finished loading. Clicking "about suzie's" caused the page to perform some local action which made things move around in random directions. I ended up looking at a blank grey rectangle with a left arrow hovering in the top right. Nothing else happened. The left arrow looked like a very bad CSS bug resulting from left/right arrows for a gallery or slideshow or something, but it turns out it's your menu. Don't auto-hide navigation elements. what if I was on a smart phone or tablet? Show the menu all the time, especially if the alternative is a "go to the previous image" arrow in the wrong place. Also, that page never loaded. Clicking on the menu caused the same "things go in random directions" maneuver that I don't really like, then BACK to the same empty grey rectangle, which was eventually filled in (after 8 seconds) by a menu that didn't fit in the current site layout. Contact Us and Specials are broken/no content. Edit: And the logo in the header should return to the main page. there is currently no way to get back to that picture of the sandwich. I like the design, but keep the menu where it belongs, fix the transitions, make the menu fit into the site design (since that's the entire purpose of a restaurant website), and finish adding content to those other 3 pages, even if it's just "the history of the company goes here lorem ipsum dolor sit amit..."
-
If you open a string with double quotes, you must close it with double quotes: $message = "Dear Administrator,\n\nthe following distributor\n\n" . $row_admin_login_RS['distributor_company_name'] . "\n\nHas modified his Distributor information record.\n"; The code you posted would (probably) throw a fatal PHP parse error. Are you not showing errors?
-
cursor: hand; That's how you defined a "hand" cursor in IE6 (and 7 under compatibility mode). In the past I've found that this works: cursor: pointer; cursor: hand;
-
Nobody would accuse Randall Munroe (of xkcd) of being unprofessional, yet he maintains multiple pages (notably his verizon math page) about stupid companies.
-
You said he was wrong. You don't think "I guess he was wrong" is being judgmental? As a personal policy I've been ignoring your little tantrums on here, but this is just ridiculous. You told an expert he was wrong when he was absolutely correct. If you're so smart, why are you asking us?
-
If a company is consistently providing a bad experience to their professional customers, there is no "unprofessional" way to draw attention to that. Making a website chronicling your bad experiences and linking out to more of the same is the calm and professional way to handle a company who has ripped you off without seeming to care.
-
You're already doing modular division, but you don't seem to know what it's for: if ($pastthedate % 26 == 0 ){ ?> This says "divide the variable by 26, and if the remainder is zero..." Change the zero to a 1 and you get the exact situation you asked about.
-
It's not slander if it's the truth. Post your story with documentation and without embellishment. The courts have ruled time and time again that sites like f*ckgeneralmotors.com is legally protected free speech regardless of trademark and copyright law.