Programming with Code From Other Resources

You have learned basics of HTML, PHP, maybe even MySQL, but you have no clue how to start programming now?

Don’t worry, I was the same, but I found out how to make use of resources. And I am here to tell you how to do it.

Let’s take that example from the “Learn to Code in 5 Minutes Tutorial“. Assuming that you need a functioning code for uploading a photo file, you would google “php upload photo”. The result will look like this:

google upload result

The first result links to the developing organization of the internet itself – royalty!

Click it, scroll down the page until you see this:

Screen Shot 2015-06-08 at 7.07.43 PM

So there is the exact instruction of what to write into an html file and what to write into a php that is called to process the upload.

Now you have the code, but how do you use it? The instructions on the site are actually pretty straightforward. But here is a simple how-to:

You create a html-file on your server and copy/paste all the code from “Create The HTML Form” into it.

Then you create a php file on your server, call it “upload.php” and copy/paste all the code from “Create The Upload File PHP Script” into it.

Then you create a directory called “uploads” on your server.

That’s it!

Now you can open your browser, go to your server’s address – which is probably a domain, you have booked – add the name of the html file as in

and hit “GO”

It should give you a “Choose File” button and a “Submit” button. Once you choose a file and hit submit, it will be uploaded. Then you can check on your server, if the file is really in the “uploads” directory.

Debug, if it does not work. Meaning: walk through the steps before and look for the error.

And that is just like you do the programming for almost anything!

Add a comment for more questions. I am happy to help!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s