Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. Personally, I don't see that as a valid argument. Generally, people who earn more money have put more effort into getting to where they are. People who put little to no effort in don't deserve an equal quality of living to that of the former. You get out what you put in. What a load of shit. If that's true then why is it that the most back breaking jobs are also the least paying jobs?
  2. seriously? this thread is 2 years old...
  3. Why are you guys still talking about it? I told you the answer : d) What is d) ? d) get someone else to do it. That is how the real world works and the microcosm that which is this thread proves it.
  4. well my initial statement was meant as a "most people don't have the choice, not everybody can be rich." And I think I have to disagree with your assertion that paycheck to paycheck living eventually leads to living outside of one's means. You need a car to get to work. You can spend thousands of dollars on a new car or you can spend thousands of dollars on a mechanic to keep an old car running. You need a place to leave. You can spend thousands of dollars on a house that you will eventually own or pay twice as month in rent every month and never own it. You can work 40hrs a week at a McJob and reduce practically eat for free or you can work 100hrs a week at a "real" job that pays more but have no time to cook, forcing you to buy expensive ready-made stuff. I don't know where you live but I've lived all over the states and in my experience there are very few people who have lots of money and nothing to do with it. You get a better paying job and it demands more money to be spent to keep that job. You get a job that doesn't require shit and you get paid shit. Apparently we've got it down to a science to make sure no matter what, you are indeed living paycheck to paycheck or in debt.
  5. yes, because most people choose to live paycheck to paycheck. Probably because it beats being rich. I hear that's a terrible thing. Easier to get a camel through the eye of a needle than get a rich man into heaven even.
  6. The answer is d)
  7. if($ensure_credentials){ $_SESSION['status'] = 'authorised'; $_SESSION['user'] = $user; header("location: index.php"); } else return "Please enter a correct username and/or password!"; index.php <?php session_start(); echo $_SESSION['user']; ?>
  8. you know, most people do live paycheck to paycheck.
  9. uh, well that sort of was the suggestion...to go OOP.
  10. so what's the point in sending the data to some validation script if you want to at the same time send it straight to some other page to be used? Send the data to your validation script. Validate it. Put it in a session var as Night suggested. Redirect to new page. And they lived happily ever after. The end.
  11. so yeah, that's pretty much the main argument for going OOP.
  12. IMO it would be "less complex" to break it down into several expressions. Example: $string = '<clp name="title" type="text"></clp>'; preg_match('~<clp ([^>]*)>~i',$string,$tags); preg_match_all('~([a-z]+)="([^"]*)"~i',$tags[1],$attribs); echo "<pre>"; print_r($attribs);
  13. You could sell your body to science. Or to locals looking for a good time...
  14. hmm...perhaps you were just looking at the wrong $name array element to begin with? $name[0] is the full match array, $name[1] is the first captured match array. So for instance, $name[1][0] would be the first captured match.
  15. personally I also sort of assumed that calculate() was also supposed to draw on the properties to do its thing, as well. But you know what they say about assuming
  16. riiiiight. So if this "exercise" is in some book you picked up, then it would also provide the answer. Flip the page, go to the index, blahblah... unless you know, you're lying about it. I'll let you in on a little secret: You'll probably more likely get what you want if you are a) honest about the situation. Believe it or not, you are not the 1st person to post homework questions. Or the thousandth. b) willing to actually put some effort into it. we aren't here to do your (home)work for you. "please post the entire code I need" is not acceptable around here. "Hi, I have this homework assignment and here's what I've tried so far and I can't seem to get it to work, can someone point me in the right direction?" Is acceptable. Which is what you started out with, but quickly went downhill from there. I suggest you read the tutorial link I gave you.
  17. 1. You would include or require the other php file in the current php file 2. http://www.phpfreaks.com/tutorial/php-basic-database-handling 3. You would store the value in the db and query for it. See #2 4. See #3.
  18. It looks like you need to learn the basics of OOP in the first place. Maybe you should have paid attention when your teacher was talking to you about it. http://www.phpfreaks.com/tutorial/oo-php-part-1-oop-in-full-effect/
  19. *sniffsniff* I smell homework.
  20. levenshtein might be useful for you.
  21. post example content of what you're trying to match and what you want the resulting match to be.
  22. Even if you insisted on taking direct cc payment, user is still going to have to go through the process of entering the info in and having it verified. If I were a small business/mom&pop shop I would personally advise for you to put on your site a revamped explanation of why you only take paypal, focusing on the benefits to the user, like how it makes your product cheaper for them.
  23. you assign session var to $varUser but use $varUsr (no 'e')
  24. $varCustID = mysql_query("SELECT CustID FROM login WHERE Usr = '$varUsr'") or die(mysql_error());
  25. $num = '+12345'; if (preg_match('~^\+?[0-9]+$~',$num)) // valid else // not valid
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.