Jump to content

guitarcoder

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

guitarcoder's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. im writing a SQL statement to write a value from a dropdown to the database but only the 'first word' is written... - the data is from table1... i created a function for a dropdown list of a column (ex: States - new jersey) function generate_titles($conn){ $titles=""; $query = "SELECT cState FROM tblState"; $result = odbc_exec($conn, $query); while ($return = odbc_fetch_array($result)){ $titles.="<option value= $return[cState]>".$return[cState]."</option>"; } return $titles; } - the column display correctly as dropdown list... - now, im trying to write it to table2 but only 'new' (instead of new jersey) is written to the database $query="INSERT INTO tbl2(sName, sAddress, sState, sCountry) VALUES ('".$NewName."','".$NewAddress."','".$NewState."','".$NewScountry."')"; $result_insert = odbc_exec($db, $query); any ideas? thanks! :'(
×
×
  • 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.