Frequently Asked Questions

Apr 18, 2024 - 05:47pm

 [F] Frequently Asked Questions  / Operational Questions  / The Web Crossing Database  /

How do I add new fields of user information to the database?

Rate This FAQ
 (Not yet rated)

Created On: 28 Jan 1998 12:52 pm
Last Edited: 22 Oct 1999 12:28 pm

Question Printer Friendly

Adding user fields to the database is sometimes confusing for new WCTL developers.

Answer

Here's an example:

Example
%% macro UserFieldExample %%
<html><title>Web Crossing - User Field Example</title><body bgcolor=#FFFFFF>
<form method="POST" action="%% urlBase %%UserFieldExampleResult@%% certificate %%@%%location%%">

%% if (user.exampleField == 1) %%
	Example user field: <input name=userField type=checkbox CHECKED> 
%% else %%
	Example user field: <input name=userField type=checkbox> 
%% endif %%

<p>
<input type="submit" value="Select">  
</td></tr></table>
</body></html>
%% endmacro %%

%% macro UserFieldExampleResult %%
<html><title>Web Crossing - User Field Example</title><body bgcolor=#FFFFFF>

%% if form.userField %% 
	%% set user.exampleField 1 %% 
%% else %% 
	%% set user.exampleField 0 %%
%% endif %%   

Current value of user.exampleField: %% user.exampleField %%<p>

<a href="%% urlBase %%UserFieldExample@%% certificate %%@">Do It Again</a><p>
<a href="%% urlBase %%14@%% certificate %%@">Back to Top Level Page</a><p>

</body></html>
%% endmacro %%