The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Changing a profile field checkbox from vbadvanced
Hi guys, got a quick question
I'm looking at setting up a mailing list on my site and was planning to have say a submit button from within a template. What i effectively want to do is check to see if the logged in user has got field 5 in their profile checked (checkbox) and if not then check it and save the change. What is the best way to do this as my coding isnt great by any means. Edit: Should have been a bit more specific about this really, i'm using vbadvanced portal, created a cusom module and want to have a submit button in that module that when clicked by the user will change field5 checkbox to checked in their profile. Thanks |
#2
|
|||
|
|||
So you want a form which has a checkbox and a submit button which when pressed saves the status of the checkbox to the db.
|
#3
|
|||
|
|||
Thanks for replying rogersnm
Not exactly, i've made a module that had a submit button that when clicked I want to change the value of a custom field in the users profile (field 5). What I really need to know is what I would need to do php wise to actually make the change to the profile as 'm assuming it'd be a mysql query which im not overly familiar with. What the entire thing is supposed to do is: 1) If the user has already checked the box via there profile or clicked the button, then the template displalys they already are subscribed (nearly done that hopefully) 2)If the user clicks the subscribe button, profile field 5 is checked in their profile to see if it's already marked, if not then it marks it and saves the user profile. <---- This is what im totally stuck on |
#4
|
|||
|
|||
So you want to link the button to a php script which will redirect once completed, which includes global.php (get field5 status and be able to query) and then one a query in a conditional.
|
#5
|
|||
|
|||
Sort of, I've already done the testing within the template so the button wont show if the user is not logged in or is already subscribed, so what i'm after doing is just having the submit button i've added set the value of field 5 to 1 in the userCP for the user viewing the page
Thanks |
#6
|
|||
|
|||
I added your yahoo
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|