Jump to content

spiderwell

Members
  • Posts

    1,008
  • Joined

  • Last visited

Posts posted by spiderwell

  1. I managed to land a job as a php developer last week, which i am really happy about.

     

    had my first day today, and my brain feels like its going to explode. the company has 1 developer who is clearly a coding genius (as far as I can tell!) and when showing me how it all works, i got so swamped with code! its a full on cms which covers everything from simple page content to full ecommerce pages, the usual media stuff and much more.

     

    I am not out of my depth, but definately out of my comfort zone! I think I can understand the code, but of course this system he has built up over a few years he has tried to explain to me in a few hours!!, I'm definately need to get my ass in gear!! haha. everything is so modular its amazing. I hope i can just pick it up quick enough that they see me as a good hire!

     

    that said i loved ever minute of it, and just thought I'd share it all with you.

     

    anyone else ever had a job like that? day one is just a big smack in the face!

  2. yeah i know, like i said its only for thumbnailing, but at the time it was  enough for what i needed, i have outgorwn it since, but i make my own upload scripts since thats very easy. heres a snippet for you, I have pulled it from a class i wrote so will need a little bit of adjusting. it returns an array with 2 values, key 0 is either true or false and key 1 has a message:

     

    <?php
    function handleUpload($fieldname)
    {
    $settings = systemcomponent::getSettings();//remove this as its irrelevant to you
    $upload = array();
    if ((($_FILES["$fieldname"]["type"] == "image/gif")
    || ($_FILES["$fieldname"]["type"] == "image/jpeg")
    || ($_FILES["$fieldname"]["type"] == "image/pjpeg"))
    && ($_FILES["$fieldname"]["size"] < 200000) || ($_FILES["$fieldname"]["name"] == "")) //this bit restricts size and file type
    {
    	if ($_FILES["$fieldname"]["error"] > 0 && $_FILES["$fieldname"]["error"] != 4)
    		{
    			$this->errors[] = "Image not saved in ImageControl->handleUpload(); || Return Code: " . $_FILES["$fieldname"]["error"] . "<br />"; //insert failed! Add error description to list of errors
    			$upload[0] = 0;
    			$upload[1] = "Image did not save";
    			return $upload;
    		}
      else
    	{
    		$filename = str_replace("'","",$_FILES["$fieldname"]["name"]); // escape ' in file name! curse these people who not know how file naming should be done! lol
    		if (file_exists($settings['imagedir'] . $_FILES["$fieldname"]["name"]))
    		  {		
    			$upload[0] = 0;
    			if ($_FILES["$fieldname"]["name"] == "")
    			{
    				$upload[1] = "please select a file.";
    			}
    			else
    			{
    				$upload[1] = $_FILES["$fieldname"]["name"] . " already exists. ";
    
    			}
    			return $upload;
    		  }
    		else
    		  {
    			move_uploaded_file($_FILES["$fieldname"]["tmp_name"],$settings['imagedir'] . $filename);//change the $settings['imagedir'] to your upload directory
    			$upload[0] = 1;
    			$upload[1] = $filename;
    			return $upload;
    		  }
    		}
    }
    else
    {
    	$upload[0] = 0;
    	$upload[1] = "file type restricted or too large";
    	return $upload;
    }
    
    }
    
    ?>
    

  3. i have had 2 people who are photographers, require a system that allows art gallerys to login who have exhibited the works of said photographer, when they make sales.

     

    for instance a dude called cedric delsaux has made some amazing star wars images in a series called Dark Lens, but the prints are all limited. so he has exhibited them in paris, dubai, new york, but there is only say 10 copies of each print in 2 formats (sizes). so if paris sold 1, that gallery logs in and marks it as sold, add the details, then if new york sells one, it logs on and see that number 1 is sold and enters for number 2.

     

    anyway i'm thinking of expanding it, improving it, making it a very professional setup but still undecided which way to go, which is either sold singularly to each photographer who wants it, or making it one big central site with all users join it and subscribe to it. (think of it having a social networking element to it)

    here is a cedric image just cuz i love star wars

     

    CedricDelsaux28.jpg

     

    my most commmon point of failure is lack of marketing skills when it comes to dollar making ideas, i made a great site once called positivity pebbles, selling small polished stones, but due to bad SEO and frankly F.A. marketing i only sold about 10 stones in a year. plus its a huge market anyways, i just had a twist on my selling point. I need to re do it since i got 300 odd stones sat in a box doing nothing haha. but it was written in classic asp and i really cant be bothered right now.

  4. welcome james james, is that is really your name. lol

     

    I am pretty sure it will only work as long as any php code is in its php <?php ....?> brackets

     

    but if someone calls up that file in the browser, they will see the php code, which wouldnt happen if the file was a .php in the first place

  5. yeah i invented facebook.

     

     

    nah sad to say i don't had plenty of ideas but not really put much effort into it, although i am thinking of making a niche system which i have done for a couple of clients in the past that doesnt seem to be 'out there' but its a long way off being a package to sell.

     

    tend to suppliment my income with freelance sites.

  6. its better to do it with them than without, cuz lets face it, you wouldnt have posted this thread if ya had  :P

     

    backticks for table names and column names, and single quotes for the data, then you won't fall over with column names that are reserved words

     

  7. I think if you really want auto increment the only real other option is an invoice table on the db which will have the obvious Id column that auto increments, and perhaps a second column that is userid. that way you can when a new order is placed is create a row, and take the new ID and pass that as the orderid to the table you already have. it will mean a bit more coding but it should make it all much more manageable in the long run

     

×
×
  • 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.