Forums Index > Mewsoft Products > Auctionawy > Ok I'm lost...
ctoshack First Post Posted on: 02-11-08 03:26 PM
Ok I'm lost...

I'm trying to add a field in the register page.

I want the user to insert who he was referred by and for that informations to go into the user tables in mysql so I can call it from a custom page.

Here is what I have done.

On signup.pm I have added the following bold selections

$Template =~ s/<!--Job_Title-->/$Param{Job_Title}/;
$Template =~ s/<!--Website-->/$Param{Website}/;
$Template =~ s/<!--Refered_by-->/$Param{Refered_by}/;
$Template =~ s/<!--Promotional_Code-->/$Param{Promotional_Code}/;

and

$Param{Fax} ||= "";
$Param{Website} ||= "";
$Param{Refered_by} ||= "";
$Param{Promotional_Code} ||= "";


In the signup.html I have added the following:

<TR>
<TD height="32" ALIGN="right" VALIGN="top" NOWRAP BGCOLOR="#F2F2F2">[[website_label]]</TD>
<TD colspan="2"><INPUT TYPE="text" NAME="Website" SIZE="40" VALUE="<!--Website-->"></TD>
</TR>
<TR>
<TD height="32" ALIGN="right" VALIGN="top" NOWRAP BGCOLOR="#F2F2F2">[[ref_label]]</TD>
<TD colspan="2"><INPUT TYPE="text" NAME="Refered_by" SIZE="40" VALUE="<!--Refered_by-->"></TD>
</TR>
<TR>


I also erased the pending users and users tables in the database and added the following code to recreate the tables with the refered_by section.

`Mobile` char(30) default NULL,
`Fax` char(20) default NULL,
`Website` char(100) default NULL,
`Refered_by` char(50) default NULL,
`Payment_Method` char(20) default NULL,

and the exact same line in the pending users tables.


What else am I missing to get this field to input into the new table of the database.
ctoshack Reply #: 1 Posted on: 02-11-08 03:30 PM
Re: Ok I'm lost...

Correction this should have been hightlighted above


`Mobile` char(30) default NULL,
`Fax` char(20) default NULL,
`Website` char(100) default NULL,
`Refered_by` char(50) default NULL,
`Payment_Method` char(20) default NULL,

Not the Website line...
mewsoft Reply #: 2 Posted on: 02-11-08 07:24 PM
Re: Ok I'm lost...

You need to add this field also in the sqldriver.pm see @users_fileds which is a list of the tables fields that will be saved to the database

Mewsoft Support
www.mewsoft.com