├── .gitignore ├── README.md ├── Week 1 ├── Autograder.docx └── Practice Quiz.docx ├── Week 2 ├── Autograder.docx ├── Practice Quiz.docx └── test.html.txt ├── Week 3 ├── Quiz.docx ├── blocks.png ├── blocksCSSvalidator.png ├── brainyquotenostyles.png ├── index.html.txt ├── indeximage.png └── inspectnavbar.png ├── Week 4 ├── phpConfig.png └── phpMyAdminCapture.png ├── Week 5 ├── check.php ├── checkimage.png ├── errorimage.png ├── fail.php ├── index.html ├── index.php ├── indeximage.png └── quiz.docx ├── Week 6 ├── assignment.docx ├── guess.php └── quiz.docx ├── Week 7 ├── failedcrack.png ├── index.php ├── makecode.php ├── md5.php ├── quiz.docx └── successfulcrack.png └── Week 8 ├── assignment.docx ├── bootstrap.php ├── exampleplay.PNG ├── game.php ├── incorrectpassword.PNG ├── ind.php ├── index.php ├── login.php ├── nameparammissing.PNG ├── quiz.docx ├── starter-template.css └── testrun.PNG /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .pytest_cache/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | db.sqlite3 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # Environments 85 | .env 86 | .venv 87 | env/ 88 | venv/ 89 | ENV/ 90 | env.bak/ 91 | venv.bak/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Building Web Applications In PHP 2 | This repository contains notes, assignments, quizzes and code files from the "Building Web Applications in PHP" course by University of Michigan, on Coursera. 3 | 4 | Find the course at https://www.coursera.org/learn/web-applications-php 5 | -------------------------------------------------------------------------------- /Week 1/Autograder.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 1/Autograder.docx -------------------------------------------------------------------------------- /Week 1/Practice Quiz.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 1/Practice Quiz.docx -------------------------------------------------------------------------------- /Week 2/Autograder.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 2/Autograder.docx -------------------------------------------------------------------------------- /Week 2/Practice Quiz.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 2/Practice Quiz.docx -------------------------------------------------------------------------------- /Week 2/test.html.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ... Anamitra Musib 659b8b ... 5 | 6 | 7 | 8 | Emphasized text 9 |
10 |

blueSAMSUNG

11 |
12 | mobile 13 | < class="feature" >FEATURES 14 | Visit google.com! 15 | 16 | Visit gmail.com! 17 | Visit yahoo.com! 18 | 26 | 27 | -------------------------------------------------------------------------------- /Week 3/Quiz.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 3/Quiz.docx -------------------------------------------------------------------------------- /Week 3/blocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 3/blocks.png -------------------------------------------------------------------------------- /Week 3/blocksCSSvalidator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 3/blocksCSSvalidator.png -------------------------------------------------------------------------------- /Week 3/brainyquotenostyles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 3/brainyquotenostyles.png -------------------------------------------------------------------------------- /Week 3/index.html.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Blocks 5 | 7 | 8 | 9 | 10 |
11 | Turns out you have a really fun time if you 12 | go to work every day and focus on being 13 | silly and funny and happy! - Hannah Murray 14 |
15 |
16 | All you need in this life is ignorance and confidence, 17 | and then success is sure. - Mark Twain 18 |
19 |
20 | Well, if crime fighters fight crime and fire fighters 21 | fight fire, what do freedom fighters fight? They never 22 | mention that part to us, do they? - George Carlin 23 |
24 |
25 | Great minds discuss ideas; average minds discuss events; 26 | small minds discuss people. - Eleanor Roosevelt 27 |
28 | 33 | 34 | -------------------------------------------------------------------------------- /Week 3/indeximage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 3/indeximage.png -------------------------------------------------------------------------------- /Week 3/inspectnavbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 3/inspectnavbar.png -------------------------------------------------------------------------------- /Week 4/phpConfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 4/phpConfig.png -------------------------------------------------------------------------------- /Week 4/phpMyAdminCapture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 4/phpMyAdminCapture.png -------------------------------------------------------------------------------- /Week 5/check.php: -------------------------------------------------------------------------------- 1 | \n"; 3 | echo 'display_errors = ' . ini_get('display_errors') . "\n"; 4 | if ( ini_get('display_errors') == 1 ) { 5 | echo("It is all good...\n"); 6 | echo "\n"; 7 | return; 8 | } 9 | echo("YOU ARE IN VERY BAD SHAPE!!!!!!\n"); 10 | echo("You need to edit this file:\n\n"); 11 | echo(php_ini_loaded_file()."\n\n"); 12 | echo("And set\n\n"); 13 | echo("display_errors = On\n\n"); 14 | echo("Until you do this, you will be very very unhappy doing PHP development\n"); 15 | echo("in this PHP environment.\n"); 16 | echo "\n"; 17 | ?> -------------------------------------------------------------------------------- /Week 5/checkimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 5/checkimage.png -------------------------------------------------------------------------------- /Week 5/errorimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 5/errorimage.png -------------------------------------------------------------------------------- /Week 5/fail.php: -------------------------------------------------------------------------------- 1 | What we want to see below is a 'Fatal Error'.

\n"); 3 | // Do not fix the mistake in the code below - the goal is to 4 | // trigger an error to verify that we see errors in the browser. 5 | failure_is_expected(); 6 | ?> -------------------------------------------------------------------------------- /Week 5/index.html: -------------------------------------------------------------------------------- 1 | 2 | Anamitra Musib PHP 3 |

Anamitra Musib PHP

4 |

5 | The SHA256 hash of Anamitra Musib is 3a8a4d70afb7290abdce326e81cb437ab6b4f434e4e5cb63df043e7fbe10ccd7 6 | ?>

7 |
ASCII ART:
 8 | 	       ***
 9 | 	      *****
10 | 	     **	  **
11 | 	    **     **
12 | 	   ***********
13 | 	  *************
14 | 	 **           **
15 | 	**             **
16 | 
17 | Click here to check the error setting 18 |
19 | Click here to cause a traceback -------------------------------------------------------------------------------- /Week 5/index.php: -------------------------------------------------------------------------------- 1 | 2 | Anamitra Musib PHP 3 |

Anamitra Musib PHP

4 |

7 |
ASCII ART:
 8 | 	       ***
 9 | 	      *****
10 | 	     **	  **
11 | 	    **     **
12 | 	   ***********
13 | 	  *************
14 | 	 **           **
15 | 	**             **
16 | 
17 | Click here to check the error setting 18 |
19 | Click here to cause a traceback -------------------------------------------------------------------------------- /Week 5/indeximage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 5/indeximage.png -------------------------------------------------------------------------------- /Week 5/quiz.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 5/quiz.docx -------------------------------------------------------------------------------- /Week 6/assignment.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 6/assignment.docx -------------------------------------------------------------------------------- /Week 6/guess.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Anamitra Musib 41884c79 4 |

Welcome to my guessing game

5 | 6 | $correctnumber) 19 | { 20 | echo "Your guess is too high"; 21 | } 22 | else if ($_GET['guess']==$correctnumber) 23 | { 24 | echo "Congratulations - You are right"; 25 | } 26 | } 27 | else 28 | { 29 | echo "Missing guess parameter
Your guess is too short"; 30 | } 31 | ?> 32 | 33 | 34 | -------------------------------------------------------------------------------- /Week 6/quiz.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 6/quiz.docx -------------------------------------------------------------------------------- /Week 7/failedcrack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 7/failedcrack.png -------------------------------------------------------------------------------- /Week 7/index.php: -------------------------------------------------------------------------------- 1 | 2 | Anamitra Musib MD5 Cracker 3 | 4 |

MD5 cracker

5 |

This application takes an MD5 hash 6 | of a four digit pin and check all 10,000 possible four digit pins to determine the pin

7 |
 8 | Debug Output:
 9 |  0 ) {
42 |                         print "$check $try\n";
43 |                         $show = $show - 1;
44 |                     }
45 |                     if($goodtext == $try){
46 |                         break;
47 |                     }
48 |                 }
49 |                 if($goodtext == $try){
50 |                     break;
51 |                 }
52 |             }
53 |             if($goodtext == $try) {
54 |                 break;  
55 |             }
56 |         }
57 |         if($goodtext == $try){
58 |             break;
59 |         }
60 |     }
61 |     // Compute ellapsed time
62 |     $time_post = microtime(true);
63 |     print "Ellapsed time: ";
64 |     print $time_post-$time_pre;
65 |     print "\n";
66 | }
67 | ?>
68 | 
69 | 70 |

Original Text:

71 |
72 | 73 | 74 |
75 | 83 | 84 | -------------------------------------------------------------------------------- /Week 7/makecode.php: -------------------------------------------------------------------------------- 1 | "9" || 10 | $code[1] < "0" || $code[1] > "9" || 11 | $code[2] < "0" || $code[1] > "9" || 12 | $code[3] < "0" || $code[1] > "9" ) { 13 | $error = "Input must four lower numbers"; 14 | } else { 15 | $md5 = hash('md5', $code); 16 | } 17 | } 18 | ?> 19 | 20 | Anamitra Musib PIN Code 21 | 22 |

MD5 PIN Maker

23 | '; 26 | print htmlentities($error); 27 | print "

\n"; 28 | } 29 | if ( $md5 !== false ) { 30 | print "

MD5 value: ".htmlentities($md5)."

"; 31 | } 32 | ?> 33 |

Please enter a four-leter key for encoding.

34 |
35 | 36 | 37 |
38 |

Reset

39 |

Back to Cracking

40 | 41 | -------------------------------------------------------------------------------- /Week 7/md5.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | Anamitra Musib MD5 9 | 10 |

MD5 Maker

11 |

MD5:

12 |
13 | 14 | 15 |
16 |

Reset

17 |

Back to Cracking

18 | 19 | -------------------------------------------------------------------------------- /Week 7/quiz.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 7/quiz.docx -------------------------------------------------------------------------------- /Week 7/successfulcrack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 7/successfulcrack.png -------------------------------------------------------------------------------- /Week 8/assignment.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 8/assignment.docx -------------------------------------------------------------------------------- /Week 8/bootstrap.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Week 8/exampleplay.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 8/exampleplay.PNG -------------------------------------------------------------------------------- /Week 8/game.php: -------------------------------------------------------------------------------- 1 | 45 | 46 | 47 | 48 | Anamitra Musib 32ce3337 49 | 50 | 51 | 52 |
53 |

Rock Paper Scissors

54 | Welcome: "; 57 | echo htmlentities($_REQUEST['name']); 58 | echo "

\n"; 59 | } 60 | ?> 61 |
62 | 69 | 70 | 71 |
72 | 73 |
74 | 
88 | 
89 |
90 | 91 | -------------------------------------------------------------------------------- /Week 8/incorrectpassword.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 8/incorrectpassword.PNG -------------------------------------------------------------------------------- /Week 8/ind.php: -------------------------------------------------------------------------------- 1 | 27 | 28 | 29 | 30 | 31 | Anamitra Musib 32ce3337 32 | 33 | 34 |
35 |

Please Log In

36 | '.htmlentities($failure)."

\n"); 42 | } 43 | ?> 44 |
45 | 46 |
47 | 48 |
49 | 50 | 51 |
52 |

53 | For a password hint, view source and find a password hint 54 | in the HTML comments. 55 | 57 |

58 |
59 | -------------------------------------------------------------------------------- /Week 8/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Anamitra Musib 32ce3337 5 | 6 | 7 | 8 |
9 |

Welcome to Broken Rock Paper Scissors

10 |

Note: This sample code is only 11 | partially done and serves only as a starting point for the assignment. 12 |

13 |

14 | Please Log In 15 |

16 |

17 | Attempt to go to 18 | game.php without logging in - it should fail with an error message. 19 |

20 | Source Code for this Application 22 |

23 |
24 | -------------------------------------------------------------------------------- /Week 8/login.php: -------------------------------------------------------------------------------- 1 | 27 | 28 | 29 | 30 | 31 | Anamitra Musib 32ce3337 32 | 33 | 34 |
35 |

Please Log In

36 | '.htmlentities($failure)."

\n"); 42 | } 43 | ?> 44 |
45 | 46 |
47 | 48 |
49 | 50 | 51 |
52 |

53 | For a password hint, view source and find a password hint 54 | in the HTML comments. 55 | 56 |

57 |
58 | -------------------------------------------------------------------------------- /Week 8/nameparammissing.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 8/nameparammissing.PNG -------------------------------------------------------------------------------- /Week 8/quiz.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 8/quiz.docx -------------------------------------------------------------------------------- /Week 8/starter-template.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | } 4 | .starter-template { 5 | padding: 40px 15px; 6 | text-align: center; 7 | } -------------------------------------------------------------------------------- /Week 8/testrun.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anacoder1/BuildingWebApplicationsInPHP/b8a220ccacd200f93413cfe3ebee10012c6100f9/Week 8/testrun.PNG --------------------------------------------------------------------------------