PHP Search records from file

The task: Write a PHP script to do the following: Read the class list in a text file, Store the records in some data structure that allows the user to search the records by ID, first name, or last name. The script provides the user with three options to input either the ID, first name, […]

Read More

PHP script to create thumbnails for images

The task: Write a PHP script to get images from database (database table “PHOTOS”), resize them and output them in the browser. Here’s my quick solution(not optimized): thumb.php [sourcecode language=”php”] <?php require_once(‘dbconfig.php’); // file that stores our database connection variables require_once(‘functions.php’); // resize script try { if (!isset($_GET[‘id’])) { throw new Exception(‘ID not specified’); } […]

Read More