close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

I think the problem is related to the Dynamic Dropdowns.

Thread began 4/09/2018 5:51 am by gregg348761 | Last modified 4/10/2018 10:53 am by Ray Borduin | 943 views | 4 replies |

gregg348761

I think the problem is related to the Dynamic Dropdowns.

I have created a number of pages with DataAssist. The Results Page works fine. However, on the Update Page I have modified two List boxes with Dynamic Dropdown array and a behaviour. When attempting to post the data to the database the following is displayed:
Notice: Array to string conversion in /Applications/XAMPP/xamppfiles/htdocs/wpc/admin/news_update.php on line 93
Notice: Array to string conversion in /Applications/XAMPP/xamppfiles/htdocs/wpc/admin/news_update.php on line 93
Notice: Array to string conversion in /Applications/XAMPP/xamppfiles/htdocs/wpc/admin/news_update.php on line 93

The contents of line 93 are as follows:
$WA_fieldValuesStr = "".((isset($_POST["headline"]))?$_POST["headline"]:"") ."" . $WA_AB_Split . "".((isset($_POST["author"]))?$_POST["author"]:"") ."" . $WA_AB_Split . "".((isset($_POST["detail"]))?$_POST["detail"]:"") ."" . $WA_AB_Split . "".((isset($_POST["category"]))?$_POST["category"]:"") ."" . $WA_AB_Split . "".((isset($_POST["date_added"]) && $_POST["date_added"]!="" )?date("Y-m-d H:i:s", strtotime($_POST["date_added"])):"") ."" . $WA_AB_Split . "".((isset($_POST["active"]))?$_POST["active"]:"") ."" . $WA_AB_Split . "".((isset($_POST["news_type"]))?$_POST["news_type"]:"") ."" . $WA_AB_Split . "".((isset($_POST["maincategory"]))?$_POST["maincategory"]:"") ."" . $WA_AB_Split . "".((isset($_POST["added_id"]))?$_POST["added_id"]:"") ."" . $WA_AB_Split . "".((isset($_POST["add_ip"]))?$_POST["add_ip"]:"") ."";
I assume that the problem arises from the $WA_BA_Split but I don't know.
Any ideas would help. I am using Dreamweaver CS6 and Databridge Version 1.2.4

Sign in to reply to this post

Ray BorduinWebAssist

My guess is that one of those fields is a checkbox group or multi-select list and is being posted as an array. Can you attach the actual page so I can open it it Dreamwweaver? That might help me track down the problem.

Sign in to reply to this post
Did this help? Tips are appreciated...

gregg348761

Sample Page causing the error

I've uploaded news_update.php which is one of the pages causing the error.
There are three 'lists' on the page but I assumed only the value of the selected item would be passed.

Sign in to reply to this post

Ray BorduinWebAssist

You have a form field name="news_type[]". If it is a single select list the field name should be: name="news_type"

That is the issue. Fields named with brackets are automatically submitted as an array.

Sign in to reply to this post
Did this help? Tips are appreciated...

gregg348761

Problem Solved

Thanks Ray, that solved the problem. I'm not sure how the [] got into the name, but it's something I'll look out for in the future.

Once again thanks for your prompt action.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...