Jump to content

krillz

Advanced Member
  • Posts

    150
  • Joined

  • Last visited

Everything posted by krillz

  1. Search the open source communities. I bet you can find hundreds of pretty awesome ready to go shoppingcart or even product catalog CMSs out there free to grab. That way you would save a ton of work, and your client will save a ton of money and happy client is a good client is a client who will recommend you to their friends. That way you can focus on creating a nice layout for the site, incorperate that to the system, and you are ready to go. Seems like the easiest way to solve your headache from my point of view.
  2. Well PHP was made to make the move from one language to PHP as smooth as possible, that's why there are a lot of functions doing the same thing with different names.. and depending on from what language you emigrated from you find people using the different styles. And that's what I like about PHP so many different styles you can use, and you pretty much find fimiliar ways/functions in it from java, c, perl etc. Anyway about the print and echo difference: The print function .. or well it's not a function but a language contruct, returns a int value whereas echo returns no value that is it's a void function. Thus the difference in speed. But still it's the way you code that determine the speed of how the code works. So echo "String 1"."String2"; is a lot slower than just doing echo on one string as the two strings need to be merged into one. to not screw the time benefit of echo, you should use it's ability to handle multiple strings at once echo "String1", "String2", "String3"; is the correct way to go, and in a impressive loop this method would save us a a few seconds in the long run. So to sum this up, small writing to the screen, let say one liners there is no noticable difference between print and echo. It's when you start outputning multiple strings at once that you start noticing a difference.
  3. Certificates mean nothing here where I live. The world is filled with people waving certificates back and forth and when pushed once hired can't deliver. Go with a solid experience with many well done jobs and an impressive portfolio. As I would always hire a person with a solid portfolio over a person that only can show me a certificate.
  4. Javascript = before the data is sent to the server PHP = when the data has been sent. So use javascript to make the interaction better for the user, but use PHP to validate again and if somethings wrong you could display the form again along with let say a somewhat red box telling the user where they didn't fill it out correctly.
  5. Check these to rule out some common mistakes: when you register a user do you save the password encrypted using the sha1 encryption? Is the mysql column where you are storing your encrypted password of the correct length, sha1 means that anything is encrypted to a 40 char long key. So if you have let say a column only storing 25 chars at a time you will be comparing a 40 char vs 25 char which will never become true. Other than that I cannot see any other mistakes one could make.
  6. well you need to check whether the numbers were sent using POST or not, in the case where nothing was sent you will get errors as the POST variables are filled with nothing. one way would be checking whether anything was sent: { // Inside your class private $no1 = 0; private $no2 = 0; public function __construct(){ if( isset($_POST['no1'] ) && isset( $_POST['no2'] ) ) { $this->no1 = $_POST['no1']; $this->no2 = $_POST['no2']; } } public function add() { return $this->no1 + $this->no2; } public function subtract(){ return $this->no1 - $this->no2; } // your class ends } $test = new nameofclass(); echo $test->add(); echo $test->subtract(); of course you could add more stuff like sending them back to the form page if they didn't send anything and so on.
  7. krillz

    PRIME OR NOT

    It's because it takes PHP more than 30 seconds to reach and check that number, and as the maximum excecution time for a script is set to 30 seconds the code is terminated before it gets there. One way is to bumbp the time up in your php.ini config file; check for the maximum excecution time limit. Or as these types of stuff really aren't suited for doing using php parser a long with the the browser approach. I would suggest you install php as a shell extension, that way you can run it in the terminal/command prompt instead and not having to mind the maximum excecution time.
  8. krillz

    Paypal web store

    Now I do not know how the layout of the shopping cart is, however I suppose you got the usual shopping cart / view shopping cart before you go ahead accepting the purchase. Well in the view shopping cart you could add a new input field for the costumer code to get the discount. Add a new function to validate the code in your validation class or whatever you are using to check if the code exists, if the code is accepted add the discount to the total cost and charge that through paypal, if not display that the code was not valid. You got the: public function GetTotal() { // add tax here.. return $this->GetSubTotal() + $this->GetShippingCost(); } so you in your case you could write the code validation function then modify the above function somthing a long the lines: if validationCode was accepted return Subtotal+shippingcost - discount otherwise return Subtotal + shippingCost. Also you do realise you just made the code for the shopping cart publicly available for people to grab? It might be an issue if the cost for the tutorial was not only charged for the tutorial but code as well.
  9. is it a "real" chat or just one of those shoutboxes?
  10. krillz

    add two nos

    Stefan it's a class that adds two numbers together. Anyway I would suggest you try this in your code; $test = new inputs(); $test->$no2 = -9; $test->addNos(); your class is not protected to outside manipulation, now that PHP has pretty good OOP functionality I suggest you start using the proper OOP declarations for variables, classes and functions like: public, protected, private and final.
  11. follow the same method as you would if you were to write a paper. Like in regular writing you have the Title for the chapter then subtitles within that chapter, the <Hn> where 1<=n<=6 should be used accordingly. One method of doing it is to imagine how your site would look like as a table of content you would have your chapter titles showing first and under it the subtitles would be shown: <h1>Title</h1> <h2>sub title</h2> <h3>Subtilte within subtitle</h3> ... and so on. My advice use them to help you organise and structure the text within your site.
  12. ah finally I can post again! I like the move towards a more community based solution. The forum well I won't say anything until I get used to the new layout, however seeing a new skin is about to launch I will wait with my comments until I see the improvements.
  13. Sorry to burst your bubble but just because you're on a *nix based system doesn't mean your imune and untouchable. So don't demolish the high walls yet, as they are still needed.
  14. krillz

    CSS & IE6

    You could put in an information header for the people still in IE6 informing them about the progress of IE ( like you are still with 6 when 8 is out), and provide a URL to the link at MS download for it. Inform them that IE6 has been discontinued and any new exploits found most likely will not get patched and put them at unwanted risks. In short, sniff if you got a IE6 surfer, inform, get them to upgrade.
  15. right click prevention with javascript, remember that one, left click followed by a quick right click always beats the javascript on that
  16. If you come from working in photoshop, you get the feeling that Gimp has a lot less functionality, which it don't it's just hard to find as it's not in the positions you are looking at. Install the gimpshot plugin to get your gimp to looks and feel like photoshop. As the only obstacle I see is the getting used to time by switching from PS to Gimp.
  17. your only chance of finding that with javascript is checking out mootools. As they have a bunch of "flash"-like functionality like sliding, animations and what not.
  18. Don't forget FireQuery, a plugin to firebug for jQuery. It's a must for developing debugging/test running your scripts on the pages.
  19. krillz

    The Olympics

    Can you see Russia' date=' too?[/quote'] Joke? If he lives close to the border with Canada he would be around 800 miles away from Russia.
  20. You will need a font organizer to do that, that way you can activate/deactivate groups you don't want to see being loaded spamming your font window. The better ones cost a little. But check out google you might find some good open source free option.
  21. Still if an agreement is reached, there is no rightous explanation to breaching the agreement, something he must learn sooner than later. As this alone could have ended in a disaster for the "designer" if he had pulled that trick on someone else than alwaysontime, who is very understanding about it.
  22. indeed I remember back in the days when we were actually reading about that in history class. Analyzing it, learning to analyze and give critisism to what we read based on the sources. Today you look at my cousins kids in school or even my younger brother, they seem a lot stupider than my generation was in that same age. The new generation teachers seem to not be on the same level as the old generation, I can see this on what they read in history, literature or even math is weak as hell with these new kids. Everything seems to be summerized and put in quickly to move ahead, and the idividual opinion is left unexplored. Well I guess it's easier to control a mass of idiots than people with their own opinions...
  23. You might have the all to common ghost of internet cache present. To save bandwitch the content of the sites are cached or buffered in some systems. That is all dynamic info is stored as a static page to decrease the server load of some function that take up a lot of resources. And this page is reindexed/recached every hour/hours. So begin with eliminating that, clean out your cached pages etc, check whether your site uses buffering and turn that off while you are updating.
  24. Review you contract, or your verbal contract if you have it recorded or a credible witness. If you came to an agreement that you were buying a costum design, that is a unique design built from scratch then contact him and tell him that he has violated the terms of the contract, make him refund the money paid or build you a new site that follows the contract directions. If this doesn't work contact a attorney and sue him, for contract violations, false marketing/advertisement, suffering and pain, lost business revenue (if you are making money of your site) and I bet an attorney will come up with a few more charges as after all they get a cut of the settlement/verdict. Hopefully you have not made the mistake of not having a valid contract accepted by both parties regarding the issue and can do that. Otherwise it might become a quite expensive lesson learnt. I myself always have a contract that I use when outsourcing design work, you would be suprised how many that get weak knees and back out of their claims after reviewing it and hearing what the consequenses may be if they in any form try to trick me.
  25. Today I have almost no respect for reporters, as the new "breed" of them must have found a degree while scavanging through garbage or something. Very few newspapers/TV station have good reporters today, I can count them on one hand. The rest is some plastic goofs, just talking a lot of shit without any real knowledge on the subject. Not to mention most reporters have for some reason come to the conclusion that gossip that belongs to some shitty weekly magazine that old grannies read are news worthy whole pages, and you find the actual important news worthy of an analyze in a small side note consisting out of 30 words. Brad Pit shaved his balls we got exclusive fotage, 3 pages. The big amount of snow now melting may cause huge floodings throughout europe, a shitty side note somewhere.
×
×
  • Create New...