KevinM1
Moderators-
Posts
5,222 -
Joined
-
Last visited
-
Days Won
26
Everything posted by KevinM1
-
Did you try using a different value for your default/non-selected option? PHP may have been treating your 0 as an actual integer, not a string.
-
Like spiderwell said, the way you're attempting to use isset is rather pointless. You don't want to check if $race exists within your check_race() function, but rather before you attempt to pass it into the function. In other words, like this: if (isset($race)) { check_race($race /* other args */ ); } else { // system error, as $race does not exist } For your original, drop down scenario, did you ever actually see if $race existed, or contained the proper test value? Basic debugging 101: if a value isn't acting as expected, echo it out to the screen to see if it's what you think it should be.
-
Do People on Here Have Websites Which Generate Some $$$ ?
KevinM1 replied to chaseman's topic in Miscellaneous
The question is really whether or not you want your app(s) to run native on the mobile device. To have an icon, to use whatever hardware acceleration there is on the device (which is likely why the latest and future versions of IE have access to the GPU), and to share/use the mobile device's own UI chrome. If that doesn't matter to you, then you can have fully functional apps using just basic web technology and the back end of your choice. Hell, I wouldn't be surprised if future iterations of devices would allow you to pin sites as apps, much like one can pin IE tabs to the Windows 7 taskbar to make it look/feel like you're starting a real app. -
Look into setInterval(). It will repeatedly run whatever code you specify at the interval you set.
-
Thanks for the insightful words , you are correct there is no point in what i am trying to do other than learn the syntax for OOP but other than REALLY basic stuff (like get / set) im stuck. Interesting you say im using PHP4 syntax, i had no idea, i am completely self taught and as yet have never read a book on PHP (obviously i will do now, any suggestions for a good one?), just out of curiosity what part of my syntax is PHP4 and what is the PHP5 or even PHP6 equivalent? oh p.s. has anyone actually got an answer to my actual problem, as i would love to know why it is not working!! The 'var' keyword is deprecated, and a clear sign of PHP 4. You should be using one of the access modifiers - 'public', 'protected', or 'private' - instead. PHP 5 has been around since 2004. There's no reason not to get up to speed with it. There is no PHP 6. The key features that were slated for PHP 6 - namespaces and late static binding - have instead been incorporated in the latest version (or so) of PHP 5.
-
Do People on Here Have Websites Which Generate Some $$$ ?
KevinM1 replied to chaseman's topic in Miscellaneous
Eh, it's not so much WordPress themes, but themes/templates in general, and what developers are looking for. Everyone's jumping on HTML5 right now, even though the spec isn't finished. Why? Because it's semantic markup (meaning, the tags actually denote meaning themselves... example: instead of <div id="nav">, there's an actual <nav> tag) that all browser developers - even Microsoft - are jumping to support. It also has added features, like canvas and audio/video markup: http://www.w3.org/TR/html5-diff/#language YouTube has a straight HTML5 player now. These additions make it easier to create web apps with just HTML, CSS, and JavaScript, which lowers the bar for entry into the mobile space. You don't necessarily need to learn Java, Objective-C, or .NET to make a quality app for a mobile device any more. HTML5 is already partially supported by the latest versions of the major browsers. Tools like HMTL5 Boilerplate help with cross-browser normalization and backwards compatibility: http://html5boilerplate.com/ CSS3, like HTML5, is not a finished spec. That said, it has a ton of improvements coming along with it as well, including easy to make rounded corners, easy to make drop shadows, and even easy to make layout columns: http://www.css3.info/preview/ It's also implemented/supported by HTML5 Boilerplate. Accessibility is, unfortunately, something many developers miss. It's not hard to make sites accessible: http://webaim.org/intro/#principles http://www.1stwebdesigner.com/design/web-accessibility-guide-beginners/ http://membership.thinkvitamin.com/library/accessibility Unobtrusive JavaScript simply means no inline JavaScript in the HTML. Don't let the description fool you - this is a powerful technique in addition to being a smart way to build and maintain a site's UI. Decoupling JS from the HTML document allows one to treat JS like a web UI programming language. Progressive enhancement means that there's a baseline functionality of the site, and more functionality is added based on what the site can handle in terms of JavaScript. That way, people still stuck using older browsers get a quality experience, and the people using modern browsers get an even better experience. These are the things professional developers are looking for in a theme/template, in addition to aesthetic quality. Meeting this criteria will allow you to charge a premium for your work. -
Do People on Here Have Websites Which Generate Some $$$ ?
KevinM1 replied to chaseman's topic in Miscellaneous
'Likely' means exactly that - the probability that a content-driven site will meet your assertion of '4-5 digit sums a month', based on the percentage of content-driven sites that do make that kind of profit compared to the overall pool of content-driven sites in existence. And how many simply fail? If all you're reading are success stories, your frame of reference will be skewed. Also, 'Making money on the internet' does not necessarily equate with 'making money on a content-driven site'. There are many factors which come into play for those content-driven sites that do generate decent profits, including, but not limited to: The quality of the content itself The origins of the site - was the site among the first of its kind? The age of the site - how much time has it had to build an audience? Celebrity status etc. Why can't execution be considered innovative? Designers and UI specialists exist for a reason. Also, why are you making a distinction between content and the execution of generating/displaying that content? Facebook's content is what other people write plus how Facebook presents it. --- No one's saying it's impossible to make money on the internet. What we are saying is that in order to be successful, you need to separate yourself from the rest of the pack, which is true for any business. With the web, it's even more important since anyone can make a site if they put their mind to it and because there are large incumbent sites swallowing a lot of traffic, depending on the subject matter. You're on a good track with your WordPress themes, since you're actually offering a product to people. Themes can generate a decent amount of money, especially if they're HTML 5/CSS 3 ready, meet accessibility guidelines, and feature unobtrusive, progressively enhanced JavaScript. -
Do People on Here Have Websites Which Generate Some $$$ ?
KevinM1 replied to chaseman's topic in Miscellaneous
The problem is that it's not likely that you'll make nearly that much with a content-driven site. You'd have to have unique content - not just unique in the sense that you created it, but unique as in special and different as well - and you'd have to spend years building up a user base. It's not that visitors = $$, but repeat visitors = $$. Regardless, for any site you need something to separate yourself from the others, else you're just another site in a sea of similar sites. This is why I can't help but shake my head at everyone trying to create a new social media site. Unless they can offer something fundamentally different or superior to Facebook and/or Twitter, they're doomed to fail. -
Do People on Here Have Websites Which Generate Some $$$ ?
KevinM1 replied to chaseman's topic in Miscellaneous
I'm not exactly sure what you mean by that but unless you have a pretty original idea that people need / want, I'm not sure there is a great deal of cash to be made. Advertising won't really earn you anything. Very true. Even if you become a minor internet celebrity, like That Dude With The Glasses/Nostalgia Critic, you're not going to make much. The sites that make money are services. Facebook is a service. Twitter is a service. YouTube is a service. That's why a good number of threads in our "Website Critique" sub-forum are about people's half-baked social media sites. Everyone wants to make the next Facebook/Twitter. -
Yuck. AVG has become a bloated mess over the last few years. For free AV solutions, one of Avast! Avira, or Microsoft Security Essentials is your best bet.
-
Eh, I think it can remain here. crmamx is looking for overall site critique, which includes, but is not limited to, critique on his content. The CSS board is for specific CSS questions, which isn't what crmamx is asking/looking for.
-
Plumbing is already in the business name. If that doesn't describe the business, nothing will. --- @OP: I think you have some potential here. Some things I'd change: Like others have said, the "Quality Service" block simply doesn't match the rest of the site. You have a swoopy blue and white motif there, while the rest of your site is dark red, gray, and white. Not only that, but the positioning of that block, in addition to the text placement and mismatched background, make it look like an afterthought. You need to incorporate that into your site rather than simply stamping it somewhere without much rhyme or reason. I dislike how much the navigation bar folds in on the sides. I've seen the effect before, but it's a bit overkill here. Reduce it by 50% on each side, and I think it would look a lot better. I don't like how you formatted the contact form. Your form fields should be flush to the left, not to the right. You should also have a little bit of space between them. Right now, they're jammed together. Also, get rid of the "Or, you can email..." line since the email option is the first contact option, and you have a heading already stating it's the email contact form. Similarly, get rid of the ginormous phone icon and find a smaller one better suited to the look and feel of your site. Finally, watch your text indenting on all your pages. Some of it seems haphazard.
-
Tutorials will only explain how to do something. They won't explain why you want to do that something, at least not from an abstract sense outside of the context of that particular tutorial. You won't be able to learn true OOP, the kind of stuff employers look for on a resume, from tutorials. You may get the basics, but that's about it. There's a fair amount of theory which goes along with it, above and beyond general coding theory. OOP is far, far more than wrapping some variables and functions in a class and calling it a day. It's not necessarily hard, but it can get confusing, especially if you don't have a solid foundation of general PHP under your feet. So, like I said before, start with the official manual link I provided above. That will get you up to speed with modern PHP OO syntax, and some of the basic ideas behind all of it. From there, if you want to learn it for real, you'll need to get some books: PHP 5 Objects, Patterns, and Practice by Matt Zandstra - http://www.amazon.com/Objects-Patterns-Practice-Experts-Source/dp/143022925X/ref=sr_1_1?ie=UTF8&qid=1304524041&sr=8-1 Design Patterns: Elements of Reusable Object-Oriented Software by the Gang of Four - http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612/ref=sr_1_1?s=books&ie=UTF8&qid=1304524065&sr=1-1 These books don't represent the entirety of what the pros know (there are dozens, if not hundreds, of books on OOP out there, with more being written all the time), but they're the two that will get you thinking as an OO PHP developer.
-
1. He's using PHP 4 syntax when he really should be using PHP 5 syntax (PHP 5 has been around since 2004). 2. Like you said, he's trying to assign form values to a method rather than passing them through the method's argument list (which shows a misunderstanding of functions in general). 3. He has public members, and then is dynamically creating more public members because he doesn't understand when to use the 'this' keyword. 4. He's attempting to invoke his database methods with parameters, even though they've been defined as being parameterless (databaseConnection, databaseConnectionSelect). 5. He's not actually passing his SQL statement to his databaseQuery::sql() method, which again shows a fundamental misunderstanding. 6. The databaseQuery::sql() method itself is gibberish. Like I said, there's a lot wrong here, and a lot of it is fundamental. It's in his best interest to start from scratch and learn it the right way. Trying to patch what he has now won't address the underlying problems.
-
Flyers. After tommorrow I may be despondent but I feel like after posting 54 shots, we are due for a win. Concentrating tomorrow will be difficult though. *adjusts Bruins hat*
-
Wow.... I hate to say this, but you're way, way, way off track with all of this. Ditch whatever resource you're using to teach yourself PHP OOP, then go to the manual (start here: http://www.php.net/manual/en/language.oop5.basic.php and continue down the list of links on the left) and start again fresh. There's too much wrong here to efficiently correct in a message board setting.
-
You should look into setting up a LAMP stack for your local machine. Far more efficient than FTPing your files over and over again.
-
Have any examples of this? I've never seen it. They must have been using a plug-in that connects to a PHP script or something, because JavaScript simply can't query a database directly, and jQuery certainly doesn't natively support it as a result. That function looks like it's simply passing an entire db query to PHP via POST. Which, if something like that actually exists, is beyond dumb.
-
Yes, you're on the right track.
-
... It seems like you don't actually know what AJAX is. In short, AJAX is when you have JavaScript send a request to a server side script. In this case, it would be your PHP script. The request sent is just a normal GET or POST request. Your PHP script would process this request just like it normally would if no JavaScript was being used, and then return the result. With AJAX, JavaScript captures that result, which it can then place anywhere in your site. Because AJAX starts and ends with JavaScript, it has no knowledge of anything on the back end. This means it has no idea about databases. All that's really going on is JavaScript acting like a bridge between your back end script and what's being displayed on the screen. So, to update a table using AJAX (not just jQuery in particular), you'd do the same things that you'd normally do on the PHP side (taking $_GET or $_POST data, running the query, etc.). When you return the result, you'd most likely want to encode it as JSON (JavaScript Object Notation - PHP has a built-in function for that: json_encode)*. Then, in your JavaScript, you'd parse that JSON data and dynamically place it in your HTML through DOM functions (which jQuery also simplifies). Read through the code examples on the jQuery site. If those don't do the job, slow down and learn the basics of JavaScript and JSON. They're core technologies for the web. *If your result is a simple string message, like "Table updated," you don't need to encode it.
-
A few things: 1. Are you securing your web forms? Are you sanitizing incoming $_GET and $_POST values? Are you escaping data you're storing in your database? 2. Change your FTP password. Be sure to choose a strong password. 3. Contact your hosting provider to see what additional steps they'd recommend, and to give them an alert to your situation.
-
Instead of trying to do AJAX in the raw, you should look at using jQuery for your AJAX needs. It'll save you from having to worry about the technical boilerplate code, and allow you to focus on what you actually want to do.
-
There's more to objects than just making things that are reusable. Reusable code can be, and is, written in a procedural manner, too. A lot of the 'magic' of OOP actually lies in being able to change behaviors at run time. From what little I've seen, you're at an intermediary point. You know that modularity is good, and that objects can be composed (that is, an object can contain another object), but that's about it. You still need to learn about abstraction and polymorphism. You also need to learn some of the common patterns of object creation and interaction. That's where the two books, especially the second, come into play.
-
You're at the beginning stages of learning OOP. You have an idea of the syntax, although you're still missing some pieces there (static methods in particular), and I'm sensing you don't really understand, or are even aware of, the ideas behind OOP in general. There's a lot more to OOP than simply wrapping things in a class and calling it a day. If you want to do OOP for real, then at the very least you should look at the following two books: PHP 5: Objects, Patterns, and Practice by Matt Zandstra - http://www.amazon.com/Objects-Patterns-Practice-Experts-Source/dp/143022925X/ref=sr_1_1?ie=UTF8&qid=1304177284&sr=8-1 Design Patterns: Elements of Reusable Object-Oriented Software by the Gang of Four - http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612/ref=sr_1_1?s=books&ie=UTF8&qid=1304177303&sr=1-1 The second book, in particular, will open your eyes to some things.