Download presentation
Presentation is loading. Please wait.
Published byAlexandra Matthews Modified over 8 years ago
1
Programming Assignment 4: HTML Table and PHP Array
2
Guideline Create a PHP file for a Lucky Draw game among at least five students – Use arrays to store the 5 students’ last name, first name and major Hint: Use 3 arrays. E.g., $lastname = array ('Smith', 'Kim', 'Davis', 'Miller', 'Taylor'); – Display the students’ information in a table using FOR Loop Hint: use echo to output the table to HTML – Randomly select a student, for each time the PHP page is visited/refreshed, as the winner of the game, and display his/her name Hint: you can use “$v = rand(0,4)” to generate a random number in [0,4] and store it in $v Submission instructions: 1.Submit your.php file to the corresponding Dropbox on ANGEL 2.In the message box, include the URL of your webpage The URL should look like: http://my.up.ist.psu.edu/USERNAME/table_lottery.php
3
Example http://my.up.ist.psu.edu/zuz22/table_lottery.php
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.