Jump to content

DrNick

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

DrNick's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks all. That's everything I needed to know. I want the content box to show "California" and save "CA" to the table so I will change the code to: <option value="CA"<? if( isset( $_POST[ 'State' ] ) && $_POST[ 'State' ] == 'CA' ) { echo ' selected'; } ?>>California</option> Nothing else in the code seems to reference the state name so I don't think the change will break anything else. Thanks again.
  2. 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.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.