hi,
i need to put some nue textboxes to my registration form in my site due to get some more informations of my users.
so, as i wanted to make new forms in my registration.html, i heard i need to make some chqanges in mysqldatabase too( i know nothing aboiut databases).
my site is based on php.
could any one any kind of explanation about what to do, i would appreciate on any info.
thanx a lot
new textbox input
Moderator: General Moderators
-
trekmtbr89
- Forum Newbie
- Posts: 3
- Joined: Wed Feb 25, 2009 9:29 am
Re: new textbox input
first off, do you have access to your sql Database? Such as PHPMyAdmin?
Re: new textbox input
i have all acceses to every section.
what actually presents my problem is that, i bought a script,installed it with install manual, adjusted it to my market region and thats all. i am not that much familiar with any of scripting languages and my script developer does not respond to my questions, thats why i decided to do it myself
what actually presents my problem is that, i bought a script,installed it with install manual, adjusted it to my market region and thats all. i am not that much familiar with any of scripting languages and my script developer does not respond to my questions, thats why i decided to do it myself
Re: new textbox input
1. Try and locate the registration page and paste the source code of that page.
2. The action page of the registration would be of help if you want us to make the code changes accordingly.
3. Please tell us the extra information details so that we can suggest respective changes you need to do in the mysql database.
2. The action page of the registration would be of help if you want us to make the code changes accordingly.
3. Please tell us the extra information details so that we can suggest respective changes you need to do in the mysql database.
-
trekmtbr89
- Forum Newbie
- Posts: 3
- Joined: Wed Feb 25, 2009 9:29 am
Re: new textbox input
Assuming that you want to be able to pull out that extra info at some later point or on some other page of the script you purchased, I would say you would need a broader understanding of PHP and SQL so you could understand and identify what the script you purchased is doing, then you may be able to add your additional field, have them get imported, and later have them display the info. Can you send a link of the script/webpage you are trying to do this on?
Re: new textbox input
i am not sure what exactly some things are you asked for but here are construction content. i already tried to put form in registration.html but i had problems with $tmp and similar values that nobody could not explain me what they are, even not what closely those thigs could be
this is content from myphpadmin:
Field Type Collation Attributes Null Default Extra Action
id int(11) No auto_increment
username varchar(60) latin1_swedish_ci No
contact_name varchar(64) latin1_swedish_ci Yes
address varchar(255) latin1_swedish_ci Yes
phone varchar(64) latin1_swedish_ci Yes
mobile varchar(128) latin1_swedish_ci Yes
email varchar(80) latin1_swedish_ci No
webpage varchar(128) latin1_swedish_ci Yes
reference varchar(255) latin1_swedish_ci Yes
show_name tinyint(1) Yes NULL
show_phone tinyint(1) Yes NULL
show_mobile tinyint(1) Yes NULL
password varchar(50) latin1_swedish_ci No
creation_date datetime No 0000-00-00 00:00:00
ip varchar(15) latin1_swedish_ci Yes NULL
activation varchar(100) latin1_swedish_ci Yes NULL
active int(1) No 1
and this is content of registration html:
{include file="header.html"}
<div id="title">{$lng.navbar.register}</div>
{if !$info}
<form name="users_form" method="post" action="">
<table cellpadding="0" align="center" border="0">
{if $error}<tr><td colspan=3 id="error" valign=middle>{$error}</td></tr>{/if}
<tr><td colspan=3><p>{$registration_info}</p></td></tr>
<tr>
<td class="form">{$lng.login.username}</td>
<td width=3 class="red">*</td>
<td><input name="username" type="text" size="25" maxlength="255" value="{$tmp.username}"></td>
</tr>
<tr>
<td class="form">{$lng.users.email}</td>
<td width=3 class="red">*</td>
<td><input name="email" type="text" size="40" maxlength="255" value="{$tmp.email}"></td>
</tr>
{if $settings.use_name>0}
<tr>
<td class="form">{$lng.users.contact_name}</td>
<td width=3 class="red">{if $settings.use_name==2}*{/if}</td>
<td><input name="contact_name" type="text" size="25" maxlength="255" value="{$tmp.contact_name}"
class="inputs" onfocus="this.className='inputs-focus';" onblur="this.className='inputs';"></td>
</tr>
<tr>
<td class="form">{$lng.users.show_name}</td>
<td width=3 class="red"></td>
<td><input name="show_name" type="checkbox" class="noborder" {if $tmp.show_name==1}checked{/if}>
{$lng.users.show_name_info}
</td>
</tr>
{/if}
{if $settings.use_address>0}
<tr>
<td class="form">{$lng.users.address}</td>
<td width=3 class="red">{if $settings.use_address==2}*{/if}</td>
<td><textarea name="address" rows=2 cols=30>{$tmp.address}</textarea></td>
</tr>
{/if}
{if $settings.use_phone>0}
<tr>
<td class="form">{$lng.users.phone}</td>
<td width=3 class="red">{if $settings.use_phone==2}*{/if}</td>
<td><input name="phone" type="text" size="25" maxlength="255" value="{$tmp.phone}"></td>
</tr>
<tr>
<td class="form">{$lng.users.show_phone}</td>
<td width=3 class="red"></td>
<td><input name="show_phone" type="checkbox" class="noborder" {if $tmp.show_phone==1}checked{/if}>
{$lng.users.show_phone_info}
</td>
</tr>
{/if}
{if $settings.use_mobile>0}
<tr>
<td class="form">{$lng.users.mobile}</td>
<td width=3 class="red">{if $settings.use_mobile==2}*{/if}</td>
<td><input name="mobile" type="text" size="25" maxlength="255" value="{$tmp.mobile}"></td>
</tr>
<tr>
<td class="form">{$lng.users.show_mobile}</td>
<td width=3 class="red"></td>
<td><input name="show_mobile" type="checkbox" class="noborder" {if $tmp.show_mobile==1}checked{/if}>
{$lng.users.show_mobile_info}
</td>
</tr>
{/if}
{if $settings.use_webpage>0}
<tr>
<td class="form">{$lng.users.webpage}</td>
<td width=3 class="red">{if $settings.use_webpage==2}*{/if}</td>
<td><input name="webpage" type="text" size="40" maxlength="255" value="{$tmp.webpage}"></td>
</tr>
{/if}
{if $settings.use_reference>0}
<tr>
<td class="form" valign="top">{$lng.users.how_did_you_heard}</td>
<td width=3 class="red">{if $settings.use_reference==2}*{/if}</td>
<td><select name="reference" onChange="onReference(this.form)">
<option value="">{$lng.users.select}</option>
{foreach from=$reference item=v}
<option value="{$v.id}" {if $tmp.reference==$v.id} selected {/if}>{$v.ref}</option>
{/foreach}
<option value="-1" {if $tmp.reference==-1}selected{/if}> {$lng.general.other}</option>
</select>
</td>
</tr>
<tr>
<td class="form"></td>
<td width=3 class="red"></td>
<td><div id="div_other_ref" {if $tmp.reference!=-1} style="display: none"{/if}><table cellpadding=0 cellspacing=0 width=100%>
<tr><td><textarea name="other" size="25">{$tmp.other}</textarea></td>
</tr></table></div></td>
</tr>
{/if}
<tr><td height=10></td></tr>
<tr>
<td class="form">{$lng.login.password}</td>
<td width=3 class="red">*</td>
<td><input name="password" type="password" size="25" maxlength="255" value="{$tmp.password}"></td>
</tr>
<tr>
<td class="form">{$lng.users.repeat_password}</td>
<td width=3 class="red">*</td>
<td><input name="password1" type="password" size="25" maxlength="255" value="{$tmp.password1}"></td>
</tr>
<tr><td height=10></td></tr>
{if $captcha}
<tr><td colspan=3 align="center">{$lng.users.image_verification_info}</td></tr>
<tr><td align="center" colspan=3><input name="number" type="text"></td></tr>
<tr><td colspan=3 align="center"><img src="include/random_image.php"></td></tr>
<tr><td height="10"></td></tr>
{/if}
<tr><td height="10"></td></tr>
<tr><td colspan=3 align=center><input name="Submit" type="submit" value="{$lng.general.submit}"></td></tr>
</table>
</form>
{else}
<table align=center width=100%><tr><td class="info">{$info}</td></tr><tr><td height=150></td></tr></table>
{/if}
{include file="footer.html"}
this is content from myphpadmin:
Field Type Collation Attributes Null Default Extra Action
id int(11) No auto_increment
username varchar(60) latin1_swedish_ci No
contact_name varchar(64) latin1_swedish_ci Yes
address varchar(255) latin1_swedish_ci Yes
phone varchar(64) latin1_swedish_ci Yes
mobile varchar(128) latin1_swedish_ci Yes
email varchar(80) latin1_swedish_ci No
webpage varchar(128) latin1_swedish_ci Yes
reference varchar(255) latin1_swedish_ci Yes
show_name tinyint(1) Yes NULL
show_phone tinyint(1) Yes NULL
show_mobile tinyint(1) Yes NULL
password varchar(50) latin1_swedish_ci No
creation_date datetime No 0000-00-00 00:00:00
ip varchar(15) latin1_swedish_ci Yes NULL
activation varchar(100) latin1_swedish_ci Yes NULL
active int(1) No 1
and this is content of registration html:
{include file="header.html"}
<div id="title">{$lng.navbar.register}</div>
{if !$info}
<form name="users_form" method="post" action="">
<table cellpadding="0" align="center" border="0">
{if $error}<tr><td colspan=3 id="error" valign=middle>{$error}</td></tr>{/if}
<tr><td colspan=3><p>{$registration_info}</p></td></tr>
<tr>
<td class="form">{$lng.login.username}</td>
<td width=3 class="red">*</td>
<td><input name="username" type="text" size="25" maxlength="255" value="{$tmp.username}"></td>
</tr>
<tr>
<td class="form">{$lng.users.email}</td>
<td width=3 class="red">*</td>
<td><input name="email" type="text" size="40" maxlength="255" value="{$tmp.email}"></td>
</tr>
{if $settings.use_name>0}
<tr>
<td class="form">{$lng.users.contact_name}</td>
<td width=3 class="red">{if $settings.use_name==2}*{/if}</td>
<td><input name="contact_name" type="text" size="25" maxlength="255" value="{$tmp.contact_name}"
class="inputs" onfocus="this.className='inputs-focus';" onblur="this.className='inputs';"></td>
</tr>
<tr>
<td class="form">{$lng.users.show_name}</td>
<td width=3 class="red"></td>
<td><input name="show_name" type="checkbox" class="noborder" {if $tmp.show_name==1}checked{/if}>
{$lng.users.show_name_info}
</td>
</tr>
{/if}
{if $settings.use_address>0}
<tr>
<td class="form">{$lng.users.address}</td>
<td width=3 class="red">{if $settings.use_address==2}*{/if}</td>
<td><textarea name="address" rows=2 cols=30>{$tmp.address}</textarea></td>
</tr>
{/if}
{if $settings.use_phone>0}
<tr>
<td class="form">{$lng.users.phone}</td>
<td width=3 class="red">{if $settings.use_phone==2}*{/if}</td>
<td><input name="phone" type="text" size="25" maxlength="255" value="{$tmp.phone}"></td>
</tr>
<tr>
<td class="form">{$lng.users.show_phone}</td>
<td width=3 class="red"></td>
<td><input name="show_phone" type="checkbox" class="noborder" {if $tmp.show_phone==1}checked{/if}>
{$lng.users.show_phone_info}
</td>
</tr>
{/if}
{if $settings.use_mobile>0}
<tr>
<td class="form">{$lng.users.mobile}</td>
<td width=3 class="red">{if $settings.use_mobile==2}*{/if}</td>
<td><input name="mobile" type="text" size="25" maxlength="255" value="{$tmp.mobile}"></td>
</tr>
<tr>
<td class="form">{$lng.users.show_mobile}</td>
<td width=3 class="red"></td>
<td><input name="show_mobile" type="checkbox" class="noborder" {if $tmp.show_mobile==1}checked{/if}>
{$lng.users.show_mobile_info}
</td>
</tr>
{/if}
{if $settings.use_webpage>0}
<tr>
<td class="form">{$lng.users.webpage}</td>
<td width=3 class="red">{if $settings.use_webpage==2}*{/if}</td>
<td><input name="webpage" type="text" size="40" maxlength="255" value="{$tmp.webpage}"></td>
</tr>
{/if}
{if $settings.use_reference>0}
<tr>
<td class="form" valign="top">{$lng.users.how_did_you_heard}</td>
<td width=3 class="red">{if $settings.use_reference==2}*{/if}</td>
<td><select name="reference" onChange="onReference(this.form)">
<option value="">{$lng.users.select}</option>
{foreach from=$reference item=v}
<option value="{$v.id}" {if $tmp.reference==$v.id} selected {/if}>{$v.ref}</option>
{/foreach}
<option value="-1" {if $tmp.reference==-1}selected{/if}> {$lng.general.other}</option>
</select>
</td>
</tr>
<tr>
<td class="form"></td>
<td width=3 class="red"></td>
<td><div id="div_other_ref" {if $tmp.reference!=-1} style="display: none"{/if}><table cellpadding=0 cellspacing=0 width=100%>
<tr><td><textarea name="other" size="25">{$tmp.other}</textarea></td>
</tr></table></div></td>
</tr>
{/if}
<tr><td height=10></td></tr>
<tr>
<td class="form">{$lng.login.password}</td>
<td width=3 class="red">*</td>
<td><input name="password" type="password" size="25" maxlength="255" value="{$tmp.password}"></td>
</tr>
<tr>
<td class="form">{$lng.users.repeat_password}</td>
<td width=3 class="red">*</td>
<td><input name="password1" type="password" size="25" maxlength="255" value="{$tmp.password1}"></td>
</tr>
<tr><td height=10></td></tr>
{if $captcha}
<tr><td colspan=3 align="center">{$lng.users.image_verification_info}</td></tr>
<tr><td align="center" colspan=3><input name="number" type="text"></td></tr>
<tr><td colspan=3 align="center"><img src="include/random_image.php"></td></tr>
<tr><td height="10"></td></tr>
{/if}
<tr><td height="10"></td></tr>
<tr><td colspan=3 align=center><input name="Submit" type="submit" value="{$lng.general.submit}"></td></tr>
</table>
</form>
{else}
<table align=center width=100%><tr><td class="info">{$info}</td></tr><tr><td height=150></td></tr></table>
{/if}
{include file="footer.html"}