Blog Post Issues

2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 16, 2014   (RSS)

By gregThomas - May 16, 2014

Hi Perch, 

For the first issue, I'm guessing that you're grabbing the list of posts before the validation/adding of the new post to the database? If you move the getRecords/mysql_select function that gets the lists of posts to after the new post is added to the database, this should resolve the issue. As when the list of records is retrieved, the new record will be in the database.

For the second item, if you're multi value select box looks something like this:

<select name="assets[]" multiple>
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="opel">Opel</option>
  <option value="audi">Audi</option>
</select>

Then you could make these values ready for CMSB by converting the array into a tab separated string. 

linkedAssets     = '\t".mysql_escape( implode("\t", @$_REQUEST['assets']))."\t',

This works because CMS Builder stores multi select values as a tab separated string in a text field.

Let me know if you have any questions.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com