MyBB Community Forums

Full Version: Efficient way of adding form values in database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
if you dont need to be able to search the data then just serialize it and the save it to a basic text type field. to populate it back, unserialize it and then set the field values

echo '<input type="text" name="data['address']" value="'.$data['address'].'">';

some way to sanitize($data['address'])

serialize($data);

save to table

get record

$data = unserialize($row['field']);

echo same input as above.
thanks paveman, you helped Smile
Pages: 1 2