close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Updating fields using Admin Update page

Thread began 10/26/2009 4:52 am by KW2912 | Last modified 10/28/2009 10:23 am by Jason Byrnes | 4209 views | 12 replies |

KW2912

Updating fields using Admin Update page

Hi there,

Me again! I've almost completed my project and am having one final problem.

I have created some extra fields in my users database and managed to create some dynamic pages which pull this information into my Clients Login pages - everything is working great.

I have also managed to copy and rename the Admin "usersUpdate.php" page and modify it to show these new fields when I am administrating any new registrations and backend Admin etc. The problem comes when I try to update the data for these new fields using the newly copied page - the updates don't seem to be being applied to my database - the previous default fields like Name and Email etc all update fine - it just seems to be the new ones I've created which don't. Obviously there is something which I've omitted and that is the reason why it's not working but I've looked over the new .php page and I just can't see what I've missed.

Any help would be appreciated to finish my project.

Thanks guys.

Sign in to reply to this post

Office Guy-172461

Find all instances of a variable in a site

One good way to see how a site is put together is to look to see how other variables are used. Pick one that works and try this:

185/

Sign in to reply to this post

KW2912

Still got the issue

Thanks. I've had a look at the link you have provided.

Seems I've got a problem with updating fields using the users_Update.php file in my Admin Back End section.

I thought it was just my new .php update page, which I had created, that wasn't working but it would seem that the default page isn't working as well. Have tried deleting the users_Update.php file and replacing it with a brand new unedited version from the original downloaded software but it still isn't working.

Front End field updating works great via users_Profile.php and updates the database just fine but when I login to the admin area I can see the details and fields, via users_Update.php, but there is no change to the database once I have pressed the "Update" button.

Anyone have any ideas?

Sign in to reply to this post

Jason ByrnesWebAssist

you will need to edit the Update Record Server behavior on the update page and bind the new form elements with the corresponding database columns.

You will need to have DataAssist installed for this.

In the Server Behaviors list, double click the update record server behavior. On the second page, select one of the new database columns, click the lightning bolt next to value and select the Corresponding form element.

Sign in to reply to this post

KW2912

Thanks but...

I think the problem is that the form is showing a "Please enter a phone number." error message and that's the reason the form is not updating. I am using British phone numbers and maybe the software is set to american style.

Does anyone know which files I need to alter and what code I need to use? I'm pretty sure if I don't get the "phone number" error then the page should update - problem solved hopefully..

Thanks for any assistance.

**Update**

I've found the problem and it's what I thought it was - an error reading the British style phone number whilst updating the records. If anyone has the same problem I went to the Admin folder opened the users_Update.php page and changed the following line to enable to page to recognise the British style phone number. The line originally read:

$WAFV_Errors .= WAValidatePN(((isset($_POST["UserPhone"]))?$_POST["UserPhone"]:"") . "",true,false,true,8);

and once I changed it to:

$WAFV_Errors .= WAValidatePN(((isset($_POST["UserPhone"]))?$_POST["UserPhone"]:"") . "",false,true,true,8);

everything worked fine and the page now updates the database.

Sign in to reply to this post

KW2912

Spoke to soon!

Having a problem with a field when I go to update it.

I input details into the field and press the update button but the field updates with a "0" and not the data I have typed - it also updates the database with this zero so at least that is something.

I've checked the code a million times but again can't see what's causing it - anyone have any ideas why the field won't update with the keyed information and replaces it with a zero?

Thanks again for all your help.

Sign in to reply to this post

Jason ByrnesWebAssist

Hard to say without seeing the code.

Please send a copy of your page.

Sign in to reply to this post

KW2912

Thanks

Here's the page that's causing me the probs. All fields are updating fine except for the "Support Team Messages" field - this is the one that changes the input text to a zero and updates my database with a zero.

Attached Files
users_Update.zip
Sign in to reply to this post

Jason ByrnesWebAssist

which field is updating with the zero?

Sign in to reply to this post

KW2912

Snccgm

Hi there,

It was the Support Team Messages field that's not functioning - all other fields are working properly.

Many Thanks

Sign in to reply to this post
loading

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