131
xgarb
ANSWERED: edituser.php - alter form - new content to database
  • 2003/10/17 15:09

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


OK found the code I was looking for...

in kernel/users.php

Add the extra fields in the form to the function at line 70+. To get them inserted into the DB add them at line 518.


Note: I recommend having the PHP debug mode (preferences) on if you have a problem - it's a great help.



132
xgarb
edituser.php - alter form - new content to database
  • 2003/10/16 18:55

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


Hi all,

I'm hacking about with edituser.php. I want to add some additional form elements and have inputted information go into the database.

I've worked out the way the forms are generated, but can't seem to get the data from the new elements to go into the DB.

Any pointers to how the database insertion actually is achieved in XOOPS?

Code is below.. my stuff in italics
_______________________________

$edituser->setVar('timezone_offset', $timezone_offset);
$edituser->setVar('country', $country);
$edituser->setVar('uorder', $uorder);

$timezone_select = new XoopsFormSelectTimezone(_US_TIMEZONE, 'timezone_offset', $xoopsUser->getVar('timezone_offset'));
$country_select = new XoopsFormSelectCountry(_US_COUNTRY, 'country', $xoopsUser->getVar('country'));
$icq_text = new XoopsFormText(_US_ICQ, 'user_icq', 15, 15, $xoopsUser->getVar('user_icq', 'E'));

$form->addElement($timezone_select);
$form->addElement($country_select);
$form->addElement($icq_text);




TopTop
« 1 ... 11 12 13 (14)



Login

Who's Online

214 user(s) are online (62 user(s) are browsing Support Forums)


Members: 0


Guests: 214


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits