MyBB Community Forums

Full Version: can i use this code on index
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi.
can i use this code at index page or at any other page such as forum/register.php or /forum/register.html

for user sign ups

<a name="signup"></a>

<form action="member.php" method="post" id="registration_form" name="registration_form"><input type="text" style="visibility: hidden;" value="" name="regcheck1" /><input type="text" style="visibility: hidden;" value="true" name="regcheck2" />



<table border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="30%" valign="top">

<div class="insetbox" style="

border: 1px solid #DEDEDE;

margin-left: 20px;

margin-top: -10px;

">

<h2>Sign Up ↓</h2><br />



<tr>

<td colspan="2">

<h4>Username</h4>

<input type="text" class="textbox" name="username" id="username" style="width: 100%; padding: 3px; font-size: 1.2em;" value="" /></td>

</tr>

<!-- start: member_register_password -->
<tr>
<td><span class="smalltext">Password</span></td>
<td><span class="smalltext">Confirm Password:</span></td>
</tr>
<tr>
<td><input type="password" class="textbox" name="password" id="password" style="width: 100%" /></td>
<td><input type="password" class="textbox" name="password2" id="password2" style="width: 100%" /></td>
</tr>
<tr>
	<td colspan="2" style="display: none;" id="password_status">&nbsp;</td>
</tr>

<!-- end: member_register_password -->

<tr>

<td><h4>Email</h4>

<input type="text" class="textbox" name="email" id="email" style="width: 100%; padding: 3px;" maxlength="50" value="" /></td>

<td><h4>Confirm Email</h4><input type="text" class="textbox" name="email2" id="email2" style="width: 100%" maxlength="50" value="" /></td>



</tr>

<tr>

    <td colspan="2" style="display: none;" id="email_status">&nbsp;</td>

</tr>

</tr>

</tbody></table>



<input type="hidden" name="step" value="registration" />

<input type="hidden" name="action" value="do_register" />



<br />

<h4 style="text-align: center;"></h4>

<td><h4><!-- PayRegister_template --><!-- start: payregister_showregister -->
<br />

<fieldset class="trow2">

<legend><strong>Cost per record</strong></legend>

<table cellspacing="0" cellpadding="">

<tr>

<td><span class="smalltext">Hello Guest inform you that the cost to register is 10.00 USD deposited by PayPal and be renewed every 1 Weeks.</span>

</td></tr>

<tr>

<td><input type="checkbox" class="checkbox" name="payregister" id="payregister" value="1"/><span class="smalltext">I accept the cost of having the record of ClinicOnline</span></td>

</tr>

<tr>

<td align="center">

<img src="https://www.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif" /></div></td></tr>

</table>

</fieldset><!-- end: payregister_showregister --><!-- /PayRegister_template --></h4></td>







<input type="submit" class="button" style="font-size: 1.5em; margin-left: auto; margin-right: auto; width: 100%;" name="regsubmit" value="Submit" />

</div>

</td>

<td width="70%" valign="top" style="padding-left: 40px;">







<br class="clear">



</td>

</tr>

</table>

<br />

<div align="center">

<input type="hidden" name="step" value="registration" />

<input type="hidden" name="action" value="do_register" />

</div>

</form>

<script type="text/javascript">

<!--

    regValidator = new FormValidator('registration_form');

    regValidator.register('username', 'notEmpty', {failure_message:'You must enter a username'});

    regValidator.register('email', 'regexp', {match_field:'email2', regexp:'^([a-zA-Z0-9_\\.\\+\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$', failure_message:'You need to enter a valid email address'});

    regValidator.register('email2', 'matches', {match_field:'email', status_field:'email_status', failure_message:'You need to enter the same email address again'});

	regValidator.register('referrer', 'ajax', {url:'xmlhttp.php?action=username_exists', loading_message:'Checking if referrer username exists.'});
	regValidator.register('password', 'length', {match_field:'password2', min: 6, failure_message:'Your password must be 6 or more characters long'});
	regValidator.register('password2', 'matches', {match_field:'password', status_field:'password_status', failure_message:'The passwords you enter must match'});
	regValidator.register('username', 'length', {min: 3, max: 30, failure_message:'Usernames must be between 3 and 30 characters long'});


    regValidator.register('username', 'ajax', {url:'xmlhttp.php?action=username_availability', loading_message:'Checking if username is available'}); // needs to be last

// -->





</script>



<!-- <script type="text/javascript" language="JavaScript">

document.forms['registration_form'].elements['username'].focus();

</script>

-->
This might work out for you easier if you want it on the forum in the header. Or you can edit the code and put it where you want. But here's a starter anyway that will get you going...

http://mods.mybb.com/view/quick-register-hamed-version
that is n0t working with me. i've custom theme so its n0t working