close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Modifying PowerStore Admin Page: product insert

Thread began 5/13/2010 1:51 pm by carlene | Last modified 5/19/2010 2:12 pm by Eric Mittman | 1734 views | 5 replies |

carleneBeta Tester

Modifying PowerStore Admin Page: product insert

Hello!
I've added some database fields to my database and some of them are text - and others are additional image files. Everything displays on my final pages perfectly. (I've been adding the additional data manually in MyPhpAdmin.)

I have modified my Product_Insert.php page to insert additional text database fields. When I did a test with just an additional text field - it actually processed the page correctly. All of the pre-existing "out-of-the-box" data fields "took." But the new data field did not insert into my database.

When I tried to add an insert image file field, the page failed. I get an error that the ProductThumb field cannot be blank. So I'm assuming that this is a bit different than updating the text insert behavior?

What I did for adding the text insert field is I added a text field to the page. I named it appropriately so that it matched the database field name. I then chose the Insert Record behavior from the Server Behaviors tab in Dreamweaver. (Originally when I did this - it wasn't seeing the database connection, so I had to establish that - which I did successfully.) Then in the Server Options frame I chose the lightning bolt and linked the text field form to the proper database field. And upon testing this - it did not insert the data into the database field.

What am I missing for the insert behavior here? That's the only thing that isn't working at the moment.

Many Thanks!

Carlene

Sign in to reply to this post

Eric Mittman

It sounds like you have correctly edited the insert server behavior. Are you able to check the db and see all of the other values that are inserted for this record and can confirm that it is the record you just inserted? If so there must be an issue with the insert on the page, maybe it is just not getting the value correctly. If you can post back with this page in a zip archive I will take a look to see if there is an issue that I can find.

Sign in to reply to this post

carleneBeta Tester

Hi Eric,

Yes - it's strange - the page takes - but my two new fields do not insert any values into the database - yet all of the other fields are inserted. (The pre-existing ones.) I didn't set up the validation for the fields - but that shouldn't matter should it?

I'm attaching the form.

Thanks so much for your help!

Carlene

Attached Files
Products_Insert3.php.zip
Sign in to reply to this post

Eric Mittman

Is this the page you are using to insert the info? If so the server behaviors that are triggered on form post are never occurring on this page because the action of the form is going to Products_Insert.php. If this is the page that you are using you will need to update the action to reflect this. If you leave it blank it will always post back to the same page.

Sign in to reply to this post

carleneBeta Tester

Eric,

Hi! Where do I change this? Can you please just tell me which lines to change and what to change them to? Also will it be a problem if I don't have the spry validation on the new fields.

Thanks!

Sign in to reply to this post

Eric Mittman

In the file you posted this code is on line 498:

<form action="Products_Insert.php"

You need to update the action so the page posts to itself. Setting the action to be blank should do this. If you do not have the spry validations in place you will not see the spry error messages if you are missing a value.

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...