looking for support on - E Business Apps Development FINAL project.. please see the attached files ..

CIB 4003 server side code – introduction to PHP

What is PHP? (hypertext preprocessor)

looking for support on - E Business Apps Development  FINAL project.. please see the attached files .. 1

Main reference website: http://php.net/

PHP is one of the most popular server side languages used on websites and is open source (free)

looking for support on - E Business Apps Development  FINAL project.. please see the attached files .. 2

Source: http://stackoverflow.com/research/developer-survey-2015

It is used by many well- known websites such as Facebook, Twitter, Wikipedia, WordPress….

Here is an example of some PHP code (ref: https://en.wikipedia.org/wiki/PHP )looking for support on - E Business Apps Development  FINAL project.. please see the attached files .. 3

Notice that the php code is embedded inside normal HTML code. It can also work without any html. The web server interprets only the code inside the php tags and it is possible to open and close php code as many times as needed within the html document. Notice also that the echo command is telling the server to sent the html code inside the speech marks.

Exercise: copy this code into a new document using Notepad++, save it as ex1.php and then run it – what happens?..........

Why? PHP is a server-side language meaning it must be uploaded to the server and run from there using http or https. How to do this…looking for support on - E Business Apps Development  FINAL project.. please see the attached files .. 4

Open a folder in Windows and type ftp://cisweb.hct.ac.ae and then add your college username and password (if this does not work advise your teacher as you may not have an account).

It should open into your own personal folder on the server:

Now make a folder called CIB4003 and inside it a subfolder called ex1.

You will create other folders for exams and your project here.

Now you can copy and paste your files from your local drive to this folder.looking for support on - E Business Apps Development  FINAL project.. please see the attached files .. 5

Then copy the URL and paste it into a browser such as Chrome and then change the protocol to https: and add in your ID number to take it to your personal folder. Don’t forget also to add in the name of the file.

You should see something like the below: (check how the URL changes from ftp)

looking for support on - E Business Apps Development  FINAL project.. please see the attached files .. 6

Exercise: create the folders using ftp, copy the file and then run it. Add more lines using the echo command using different tags. Then add some content in html not php. Get the idea?

Another exercise: add the command phpinfo(); into your php code then run it. what does this do?

Note: Every time you change your PHP code you must upload it and test it from the server. You can do this automatically in Notepad++ using the NPPftp plug in if you like or just drag and drop.