ober
Staff Alumni-
Posts
5,327 -
Joined
-
Last visited
Everything posted by ober
-
You cannot include an entire set of forums in another page. It's impossible. If you want a specific URL to go to your forums, just use the header() call on the forums.php page to redirect the user to the main page of the forums.
-
As far as I know, there is no way to get a snapshot of a website, and if you can, you could probably sell it. You'll have to actually capture an image of the site (screenshot) and manually create the thumbnail. There is no way to create what you're asking programatically through PHP.
-
ASP doesn't have a foreach() type function. What's wrong with the code as-is?
-
Your code doesn't have ANY PHP in it. I'm moving this to the Javascript Board.
-
You can do this both ways. 1) You can have them enter a part number and give them a button. The button submits the form and either takes them to a second form where they fill in additional information about the part to be submitted for insertion, or it takes them to a page that says the part already exists. 2) Same as above, but you use AJAX to return the results. If you don't understand what AJAX is, check out www.ajaxfreaks.com (a sister site of phpfreaks). It's a javascript call that can run a PHP script that will return data to a specified area of your page without reloading the page. I'd personally go with AJAX, but it requires the user to have Javascript enabled to use the functionality of the site.
-
Better: Store their IP in a database table along with the number of downloads and the date/time they downloaded the files. When a download is attempted, check the table and the number of downloads before passing them along to the actual download page. If they've surpassed their limit, send them to a different page. I'd also have another script that runs on that page that reduces their download count after a certain period of time, or provide some way to earn points towards more downloads or something.
-
Why can't you just set the keys normally? [code] for($i = 0; $i < $con_count; $i++) $con_arr[$this->_data_contact[$i]->person_id] = $this->_data_contact[$i]->first_name." ".$this->_data_contact[$i]->last_name; [/code] By the way, it may be force of habit for some, but you don't need braces around a single-line for/if/while.
-
Do you want to tell us what is wrong? (ie. what errors, what you expect and what you don't get?)
-
You're going to want to use preg_match() with regular expressions to grab that out. You basically want to look for "action=" and grab everything from there until you find a space, and then do a str_replace on the quotes.
-
Odd. I know you got that code from the manual, so I tried the same code myself and got the same results. I'll look into it some more.
-
I'm going to assume a few things: 1) That you're storing the Category ID in the Articles Table with each article. 2) You're already using SELECT SQL statements to grab the data. If those 2 things are correct, all you need to do is know how to use a WHERE clause in your SQL statement: [code]$query = "SELECT * FROM Articles WHERE Category_ID = '" . $_REQUEST['catid'] . "'";[/code] Then you just run the query and display the results as you normally would. Hope that helps.
-
Well, the question would be how are you passing the value to the page to decide which file you want to read? Gaia is mostly right, but we have to know the above before we proceed. If this is hardcoded, and you put them in an array: [code] <?php $myarray = array('10', '11', '12'); foreach($myarray as $key => $val) { $page = file($url . $myarray[$val]); // you can do this with the $_POST/$_REQUEST array too // process as normal } ?> [/code] The only other problem you'll have to deal with is what you do with the variables at the end. You'll have to make your $out array a little more dynamic or you'll have to store everything in records in a database or some other storage medium.
-
Are you storing that information in a database or in a text file? Your display page would need to open one or the other to view that information. Can you be a little more specific about the problem you're having?
-
Security: Looks better with the Paypal logo. Home page: The first thing I would do is change the banner image. It looks like a mid-90ish type banner with just some text and a funky background. Put a nice car image up in there. I'd also lose the full-width style of the site, as that can cause problems stretching your content. Using a fixed-width site not only let's you know exactly where things will fall, but it also makes you look like you have more content.... and as an added bonus, it allows you to have a defined-width banner image. I'd love to see a tricked out car in the banner or a picture of the buildiing where they do business.... or even a car being worked on. In terms of actual content, you could list testimonials or provide some kind of company motto or even throw up a few more pics. People expect sites like this one to take a little longer to load because they want to see your products. Just don't take advantage of that too much... know when to reduce the images. Navigation: On the home page, your nav items are only about 8 pixels high (if I had to guess). When you go to the other pages, they're at least 15, plus they still have the gradient. Not only does it look bad, but it means your coding sucks. You should have 1 menu page that you include everywhere so that you only have to update it in one place. You're using PHP, so take advantage of it. Contact Page: Looks better... but you could use a space between the "Required" and the box you're putting it next to. It also wouldn't hurt to redirect the user back to the homepage after a short delay... maybe 10 seconds of displaying the "thank you" (use the PHP header() call). You might also mention that "someone will contact you shortly". Select Box: I'm 99% sure you can use both count and length on an array in Javascript. Enlarged Pics: Just changing the width of a picture doesn't really help the user. You should really look into resizing the pic to a specific height and width using the GD library (I hope your host has that installed). List: Yeah, that's what I meant. Something else to pick on: when you hit the "view shopping cart" link, the banner turns red. Consistency would be nice.
-
I don't have many blank lines, and I think it'd be hard to differentiate between blank lines and comment lines. And I'd guess that if you took both of those out, I'd still be above 40,000. Alright... I had to know: [code]$lines = 0; foreach (glob("*.php") as $filename) { $thefile = file($filename); foreach($thefile as $key => $val){ if(trim($val) != '') $lines++; } } echo "Lines of code: ". $lines;[/code] That takes one of my biggest applications from 9474 lines of code to 8630, about an 8.5% drop, which as I guessed, still leaves me about 40000 lines if the ratio is similar in the other apps. Keep in mind that this doesn't remove comment lines.
-
A few complaints: 1) as moberemk mentioned, the nav looks awful and changes size depending on what page you're on. Lose the gradient and go with a more pleasent roll-over effect (changing background color, changing border color... something). 2) Contact page... when there is an error, you should explain what it is and show the form again, refilling non-vital information. It needs work, at best. 3) If there is only one option in the dropdown, have it pre-selected. 4) If the "enlarged" picture is the same size as the current picture, don't provide a link to an "enlarged" version. 5) If you don't have any of a specific item, don't show it to me. Only list parts that you have. Listing a part when you have none of them is only teasing the customer. 6) Half of your links go to the same page with a different internal link in them. Is it that hard to create seperate pages for each of those items? I don't think your privacy policy belongs on the same page as the shipping info. 7) You claim it's a secure site, but other than the little lock, which switches between being centered and not in the right column, I don't see any evidence of it. There's no security certificate, you're not using https, and the browser has no indication that it's a secure site..... you don't give me any reason to think that it's secure other than your little logo. It's a good start, but it needs a lot of work.
-
Apparently I underestimated myself. Using Andy's code, I'm showing 44,167 lines of code. And that's only the top level of each application, but it also includes a little over 2000 lines that I didn't write. So if it all balances out, I'd say I've written at least 43000 lines of PHP/JS/HTML in the past year and a half. Crazy.
-
That's kinda what I thought about doing... I'll have to play around with it.
-
Does anyone know of a tool that could count the number of lines of code in a project or just in a bunch of files on a server? I've been working on a number of applications for work that are all web-based and I'm just curious. For example, one of my backend ajax files is almost 900 lines of code by itself. If I had to guess, I'd say I have close to 20,000 - 30,000 lines of code in all the various applications. And I've written 99% of it myself (I'd say .2% is javascript I've found elsewhere and another .8% is PHP that I picked up on here or other places.
-
From what I get out of that, it's just a fancy way of saying that a lot of MS applications can tie into a remote host very easily and edit the files.
-
Is it really that hard to google? [a href=\"http://www.webdav.org/\" target=\"_blank\"]http://www.webdav.org/[/a] [a href=\"http://www.microsoft.com/windows2000/en/server/iis/default.asp?url=/windows2000/en/server/iis/htm/core/wcwdcp.htm\" target=\"_blank\"]http://www.microsoft.com/windows2000/en/se...core/wcwdcp.htm[/a] The second is probably better. It basically means you're screwed. You're running your website on an IIS server. Hehe...
-
Thanks for dragging up a thread from a year ago and doing nothing but quoting someone! Thread CLOSED.
-
I don't know if "more" moderators is the answer... maybe replacing some of the current ones with active people (although I might get the axe in that case, even tho I do use my power from time to time).
-
Yeah, I know the banner isn't the best ever, but I suck at graphics... gimme a break. And yeah, I'm jacking the suckerfish dropdowns... I quit in the middle of the conversion last nite, so it's kinda screwed up at the moment. I guess you guys can ignore this thread until I do more with it. I'm redesigning the colors and how the site works.
-
Thanks for the input Mark. The blue border will be going away, along with the generally "blue" color scheme. The blues are left-overs from a previous design, and I haven't gotten around to updating them. I was just so geeked about how the banner image came out that I had to post it. I suck at graphics and that's gotta be one of the best little tricks I've been able to pull off. I know I brought up the thing about "not everyone has JS enabled", but I can't stop using it. I'm actually thinking about replacing the current structure of the index page with an AJAX function to bring up the party schedule info. That'll involve JS as well. I always forget about the banner image link... I'll take care of that too. I'll fix up the forms as well with the first-item-focus thing too... I forget to do that as well.