===== CS 328 - Week 13 Lecture 1 - 2024-04-15 ===== ===== TODAY WE WILL ===== * announcements * PHP, sessions, OCI, and "branching back" * prep for next class ===== * should start reading/doing activities in zyBooks Chapter 6 - More PHP * deadline to complete these: 11:59 pm pm Friday, May 3 * watch for class e-mail when Homework 10 is posted ===== * CS FACULTY CANDIDATES should be giving their TEACHING TALKS during the next THREE Wednesdays in CS 328: * Wednesday, April 17 * Wednesday, April 24 * Wednesday, May 1 * the FIRST 45 minutes will be their talks, FOLLOWED by CS 328 course material for the REST of those class sessions * RECORDINGS will be posted to supplement for the missed class time * Because of the importance of student feedback on these candidates, you will receive 2 clicker questions' credit for attending their talks * (and there WILL be at least one actual clicker question during the class material following) * Let me know if you have any questions about this!! ===== PHP Survival Tips ===== * it really helps, during debugging, to have included in your PHP: ini_set('display_errors', 1); * it really helps to use at least a helper function for each state in your application's state diagram, (and maybe more!) ...and to start with stubs for these within your application's "driving" PHP * when you get a completely blank screen as your PHP response, remember you can use the php command-line interface on nrs-projects to see if there's a parse error * I also am finding it useful to output p elements at intermediate points when I can't figure out *where* a bug is. (<p> before the while loop </p>, <p> DID connect </p>, <p> called function blah with argument <?= $param ?>, etc.) * browsers CAN be a *pain* when you try to view the source for a postback PHP -- I'm finding that, lately, both Chrome and Firefox are fetching the NEXT state when I'm trying to see the PHP-generated source in my browser for debugging! * this MIGHT be a preference that can be set...? * Safari, currently, is NOT doing this to me, so I am finding myself using that a lot!