I had two questions about pset7 and thought I'd post them together.
The first regards styling. Just for fun, I wanted to try changing the CS50 Finance logo that appears on the top of each webpage to a different image. However, despite saving an image from the web in the same folder (public/img), my image doesn't display. Does it need to be a gif? And if so, why does it need to be a gif? My girlfriend, who is a web designer was a little confused on this point.
My second question regards quote.php. No matter what stock symbol I type in (GOOG, FB, etc.) I receive an apology message that says that the stock symbol is invalid. I also receive this message at the top of the page in an error box:
Notice: Undefined index: symbol in /home/jharvard/vhosts/pset7/public/quote.php on line 7
My code checks to see if
lookup($_POST["symbol"]) is false, and if it is, it should apologize. It seems that this lookup is always returning false, and that something is wrong with this line of code:
Or maybe this one?
Any help on either of these two issues, or both, would be great! The first would be helpful for lots of people. The second might just be a personal issue...but then again, it's possible others will have this problem as well.