Hi all, I have a PHP form that sends data to live DB and I have combined first and last name fields into 1 field (Full Name). However when the data is send to database I need to split the Full Name into x_C1Firstname and x_C1Lastname fields so they are stored properly in the DB. So for example, if user enters John Smith as Full Name and presses Submit, I need to add "John" to x_C1Firstname and "Smith" to x_C1Lastname. Any advice is appreciated. Thanks
preg_split or explode, right. They both return an array and you need to access each index separately. Instead, you can list them in variables. list($x_C1Firstname , $x_C1Lastname) = preg_split('/\s/', $_POST['x_C1Firstname']); Code (markup):