close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Update Profile form posting odd data

Thread began 3/21/2016 5:53 pm by gail.bergan407744 | Last modified 3/24/2016 1:59 pm by Ray Borduin | 135 views | 7 replies |

gail.bergan407744

Update Profile form posting odd data

I have an Update User page that admins use to update member data. It is posting odd data to our database and I cannot ferret out why.

First, the password field initially pulls up the correct info, but if a change is made, it posts back as blank (and has wiped out the password field in the database).

Second, I have two date fields which are configured as such in the database. But whenever we save the profile page, the date_removed field posts as 1969-12-31 (!!) and the year_removed field posts as 2000. This happens consistently - it is introducing this errant data into my database and I cannot find anything in the attached form that would explain it. The structure of the MySQL database simply has these two fields set as date fields, not null, the year field set to 4 digits and the date_removed field set to xxxx-xx-xx.

Using Dreamweaver CC and your MySQLi extension. Thank you for any help you can give.

Attached Files
update_user.php
Sign in to reply to this post

Ray BorduinWebAssist

1) It looks like your password field is bound wrong... onl ine 53 it should be:

$UpdateQuery->bindColumn("password", "s", "".((isset($_POST["password"]))?$_POST["password"]:"") ."", "WA_IGNORE");

2) This looks like it should work... i'd have to debug it. Can I get a URL and login information to reproduce the problem and FTP access to debug it?

Sign in to reply to this post

gail.bergan407744

Ray,

I knew the password field was bound incorrectly, I just couldn't figure out how else to bind it. Please see PM area for the login info.

Gail

Sign in to reply to this post

gail.bergan407744

SEE PM below

Sign in to reply to this post

Ray BorduinWebAssist

I updated the line I suggested in the post above and it appears to work now.

Sign in to reply to this post

gail.bergan407744

I agree - the password field is working now, and I thank you,

Did you have a chance to look at the issue of this form introducing the odd data into those two data fields? Whenever we enter 0000-00-00 into the Date Removed field, it posts 1969-12-31 to the database, and when we enter 0000 to the Year Removed field, it posts 2000 to the database. This is really messing us up.

Gail

Sign in to reply to this post

Ray BorduinWebAssist

I updated your queryobj.php file to accept the date 0000-00-00

I can't seem to get the year removed field to accept the 0000 value... It is because your data type in the database is Year(4) and it appears that mysql is interpreting the date '0000' as '2000' automatically.

I got it to enter null if the field is left blank.. maybe you can use that as an alternative to identify lost members.

Sign in to reply to this post

gail.bergan407744

Well I never would have known to fiddle with the queryobj.php file - since I didn't know it existed! Thank goodness for your help!

The dateremoved field is working perfectly now. The year_removed field was still returning 2000 if I entered 0000 or just a blank field. But you gave me an idea. I went into the structure of the MySQL database and set the attributes of that field to NULL, and None as a default. So now, if we leave it blank, it remains blank. If we enter 0000, it returns as simply 0. If we enter 2015, it returns as 2015. Voila!

Thank you so much for your help with this pesky business!! You don't know how much I appreciate it.

Gail

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