Hi Everybody!
I am new to PHP (in fact, I know next to nothing about it). I have been tasked with making a change to the company website. This website was written by somebody else and is written in PHP. The page in question has a form with a content box to put in "State". It is currently storing the full state name and I need to change it to 2 letter abbreviations. The code looks like this:
<option value="California"<? if( isset( $_POST[ 'State' ] ) && $_POST[ 'State' ] == 'California' ) { echo ' selected'; } ?>>California</option>
I've been able to figure out that the 3rd "California" is what is listed in the box and that the 1st "California" is what is saved but I'm not sure what this part means:
<? if( isset( $_POST[ 'State' ] ) && $_POST[ 'State' ] == 'California' ) { echo ' selected'; } ?>
I'm coming up empty using google to decipher it and I don't want the form not to work correctly. Can anybody translate it into plain english for me?
Thanks in advance.