ober
-
Posts
5,327 -
Joined
-
Last visited
Posts posted by ober
-
-
Oh... well I wasn't clear on the intent. You can still get totals within one query. You should be able to use a combination of DISTINCT, COUNT and GROUP BY to get what you need. I'd suggest posting in the database boards to get that information.
-
From your query you posted it looks like all you need to query the DB for a user is their phone extension, right? If so, I'd create a text file with the following (just a list of extension numbers):
1234
1343
2345
Then:
$exts = file('/home/user/phones.txt'); foreach ($exts as $num => $ext) { $query = "SELECT * FROM table WHERE ext = $ext"; // do whatever else needs to be done here }
Or if you want to just do one query where you grab all of the records at once:
$exts = file('/home/user/phones.txt'); $str .= "SELECT * FROM table WHERE ext IN (".implode(",",$exts.)")"; // do whatever else needs to be done here }
Does that help?
-
Ick. The graphics are poorly done, the layout is weak at best, and there are some glaring annoyances all over it.
1) "X should not be null" is a bad way to phrase an error message on a social networking site (signup page).
2) The logo is uninspiring and doesn't match the background color of the header area.
3) You're using a mailto link for suggestions. Who still uses mailto links??
4) I'm in the help section... but how do I get to anything else? The navigation is at the bottom... BAD IDEA.
I'll stop there. Overall it's a 3/10.
-
For the users list, you could simply create a text file that you edit. Search the board on handling files or look at the manual under http://us.php.net/manual/en/function.file.php. That should get you started.
Then you just feed the extension into the query as a variable in a loop. file() will split the contents of the file into an array already so you can just use foreach() or a while() loop to run through the array.
As far as sorting by column, simply pass a variable to the query and use an "ORDER BY" clause (this works in any DB).
-
I'm not clear on what you're trying to do or the error that is happening. Can you clarify?
-
You now, if we had such a thing in the market..... We wouldn't be here right now having this discussion. Infact, I would hack google, ebay, paypal, and phpfreaks.
Umm... yeah... none of those sites, except for us, are using PHP. Trust me on that.
-
That's about enough. Fenway was simply stating that if you're so eager to hand over your details, you probably didn't build it yourself. It's a fair enough statement without knowing more about you.
Attacking a global mod and using language to stoop to an even lower level will get you nowhere around here.
-
6/10
1) Too many colors. Lose the green or lose the purple.
2) The background image repeats horribly. Find something different, and maybe don't let it repeat.
3) The header graphic is grainy and very poorly done. www.sxc.hu (find a better background)
4) Padding is your friend... use it in the content area. Text should not bump into the graphics that flow in the content.
5) The text changes too much... bold, large, italic, small... it's all over the place. Tone it down.
6) If you're going to have something without flowing text around it (videos on a few of the pages), then center the video.
-
The only way to do this is with something like AJAX. PHP will complete everything in the script before sending it to the client.
-
I'm not clear on what you want to replace it with or why? Are you sure you're not after the nl2br() function?
-
That would definitely be cleaner than my idea.
-
You need to surround all of those inputs with single quotes... they're all strings. The only time you can leave off the single quotes is if the value is strictly an integer or a float.
Also, always use " or die (mysql_error()). That will be much more descriptive.
mysql_query("INSERT INTO intowar1 (ipaddress, thedate, name, thename) VALUES('$ipaddress', '$thedate','" . mysql_real_escape_string($_GET['name']) . "', '$thetime')") or die('Theres an error. Please try again.#');
-
Set the indexes of your array to the file name, then sort the array using the above function. Since your array values are simply integers, the biggest number will be the most recent file changed. Once it's sorted, I believe your last array element should be most recently modified file (and just grab the key of that one to get the file name).
-
Your checkboxes should all be named the same: "box1234" or something similar. When you submit the form, you search for anything in the $_POST array that begins with "box" (use substr) and get the number portion after it. The number portion would be the ID of the ad in your database. Then you simply build a query out of the string of IDs you just gathered and throw that in a new query: "SELECT X, Y, Z FROM table WHERE ad_id IN ($string_of_ids)".
-
The only other option I see is to setup a small shopping cart with a "donate" item that they "purchase". You could use multiple "items" with varying costs to cover different donation amounts.
-
I give it a 5/10.
1) Some of the icons are very fuzzy.
2) You have a "show links" tab or something once the user logs in that looks AWFUL.
3) It doesn't play well at smaller resolutions (even 1024x768).
4) There are places where you have boxes side by side and they're different sizes.
It just doesn't look polished.
-
I don't see a huge difference. It looks cartoonish now and the black background isn't helping. The main content area still looks the same.
Try again.
-
A quick google search turned up this: http://www.andymoore.info/php-to-detect-mobile-phones/
-
Search google for mod_rewrite. And you cannot have spaces in a URL.
-
PHP does not affect the browser. This is something running on the client on your friend's computer that is doing it (browser plugin or 3rd party configuration). I would look at your client-side scripting (any flash/JS, etc. that you're using).
-
We got hacked constantly.
-
Not bad... I'd reduce the height of the header image a little bit. And I'd lighten the colors of the links in the category area. Otherwise it's pretty good for a dark site.
-
http://collecta-mania.com.au/shipping_info.php -> Holy mother of God. What are you trying to do, blind the users?
There is too much white space. I'd rather see you use a background color/image for the non content area.
I'd drop the image above the content after the index page.
I'd add a captcha to the contact page.
-
The design is awful... there's really no point in reviewing it. Start over.
And what's the point with that small of space/bandwidth. There are many free hosting accounts you can get that give you more than that!
Fundobox.com
in Website Critique
Posted
On cnn, you can still navigate the site from the top.