I was trying to create a custom join form and post all the data into the database by setting the form action to join.php but why my form is not working? Even the photo can be processed and uploaded. I think I have used the correct variables since I get the form elements name by viewing the source code of join,php page.
Can somebody please let me know how i can make my custom form works with the system existing membership registration script? My html form as below. Thanks. Or is the captcha giving problem to me or my elements name are not correct ?
- Code: Select all
<form id="join_form" enctype="multipart/form-data" onsubmit="return validateJoinForm(this);" method="post" action="/join.php" name="join_form"> <script type="text/javascript" language="javascript">
$(document).ready( function(){ //onload
//apply counters to textareas
$( 'textarea.input_area' ).each( function() {
function setCounter() {
if( $area.val() )
$counter.show( 300 );
else
$counter.hide( 300 );
$counterCont.html( $area.val().length );
}
var $area = $(this);
$area.after(
'<div class="counter" style="display:none;">Counter: <b></b></div>'
);
var $counter = $area.siblings('div.counter')
var $counterCont = $counter.children('b');
setCounter();
$area.change( setCounter ).keyup( setCounter );
} );
} );
</script>
<input type="hidden" name="join_page" value="done" /><table id="join_form_table" cellspacing="0" cellpadding="0" border="0"><tr class="headers"><th class="header form_second_col" style="display: none;"> </th><th class="header form_second_col" style="display: none;">First Person</th></tr><tr><th class="block" colspan="2">General Info</th></tr><tr>
<th class="label">Username: <span class="form_mandatory">*</span>
<img class="form_info_icon" src="http://www.mysite.com/templates/tmpl_uni/images/icons/info.gif"
onmouseover="showFloatDesc('Select username which will be used for logging in to the site');"
onmousemove="moveFloatDesc( event )" onmouseout="hideFloatDesc()" /></th>
<td><input type="text" class="input_text" name="NickName[0]" value="" /><img src="http://www.mysite.com/templates/tmpl_uni/images/icons/warn.gif" class="form_warn_icon" style="display: none;" onmousemove="moveFloatDesc(event)" onmouseout="hideFloatDesc()" /></td></tr>
<tr>
<th class="label">Full name:
<img class="form_info_icon" src="http://www.mysite.com/templates/tmpl_uni/images/icons/info.gif"
onmouseover="showFloatDesc('Enter you full name here');"
onmousemove="moveFloatDesc( event )" onmouseout="hideFloatDesc()" /></th>
<td><input type="text" class="input_text" name="Full_Name[0]" value="" /><img src="http://www.mysite.com/templates/tmpl_uni/images/icons/warn.gif" class="form_warn_icon" style="display: none;" onmousemove="moveFloatDesc(event)" onmouseout="hideFloatDesc()" /></td></tr>
<tr>
<th class="label">Email: <span class="form_mandatory">*</span>
<img class="form_info_icon" src="http://www.mysite.com/templates/tmpl_uni/images/icons/info.gif"
onmouseover="showFloatDesc('Enter your Email. Your password will be sent to this email.');"
onmousemove="moveFloatDesc( event )" onmouseout="hideFloatDesc()" /></th>
<td><input type="text" class="input_text" name="Email[0]" value="" /><img src="http://www.mysite.com/templates/tmpl_uni/images/icons/warn.gif" class="form_warn_icon" style="display: none;" onmousemove="moveFloatDesc(event)" onmouseout="hideFloatDesc()" /></td></tr>
<tr>
<th class="label">Password: <span class="form_mandatory">*</span>
<img class="form_info_icon" src="http://www.mysite.com/templates/tmpl_uni/images/icons/info.gif"
onmouseover="showFloatDesc('Please specify your password. It will be used for logging in to the site. This storage is secure, because we are using an encrypted format.');"
onmousemove="moveFloatDesc( event )" onmouseout="hideFloatDesc()" /></th>
<td><input type="password" class="input_pass" name="Password[0]" /><img src="http://www.mysite.com/templates/tmpl_uni/images/icons/warn.gif" class="form_warn_icon" style="display: none;" onmousemove="moveFloatDesc(event)" onmouseout="hideFloatDesc()" /></td></tr>
<tr>
<th class="label">Confirm password: <span class="form_mandatory">*</span>
<img class="form_info_icon" src="http://www.mysite.com/templates/tmpl_uni/images/icons/info.gif"
onmouseover="showFloatDesc('Enter the same password here');"
onmousemove="moveFloatDesc( event )" onmouseout="hideFloatDesc()" /></th>
<td><input type="password" class="input_pass" name="Password_confirm[0]" /><img src="http://www.mysite.com/templates/tmpl_uni/images/icons/warn.gif" class="form_warn_icon" style="display: none;" onmousemove="moveFloatDesc(event)" onmouseout="hideFloatDesc()" /></td></tr>
<tr>
<th class="label">State: </th>
<td><input type="text" class="input_text" name="State[0]" value="" /><img src="http://www.mysite.com/templates/tmpl_uni/images/icons/warn.gif" class="form_warn_icon" style="display: none;" onmousemove="moveFloatDesc(event)" onmouseout="hideFloatDesc()" /></td></tr>
<tr>
<th class="label">City: <span class="form_mandatory">*</span>
<img class="form_info_icon" src="http://www.mysite.com/templates/tmpl_uni/images/icons/info.gif"
onmouseover="showFloatDesc('Enter the name of the city where are you living');"
onmousemove="moveFloatDesc( event )" onmouseout="hideFloatDesc()" /></th>
<td><input type="text" class="input_text" name="City[0]" value="" /><img src="http://www.mysite.com/templates/tmpl_uni/images/icons/warn.gif" class="form_warn_icon" style="display: none;" onmousemove="moveFloatDesc(event)" onmouseout="hideFloatDesc()" /></td></tr>
<tr><th class="block" colspan="2">My Photo</th></tr><tr>
<th class="label">Upload Profile Photo: <span class="form_mandatory">*</span>
<img class="form_info_icon" src="http://www.mysite.com/templates/tmpl_uni/images/icons/info.gif"
onmouseover="showFloatDesc('Upload Profile Photo');"
onmousemove="moveFloatDesc( event )" onmouseout="hideFloatDesc()" /></th>
<td><input type="file" size="23" class="" name="photo"/><img src="http://www.mysite.com/templates/tmpl_uni/images/icons/warn.gif" class="form_warn_icon" style="display: none;" onmousemove="moveFloatDesc(event)" onmouseout="hideFloatDesc()" /></td></tr>
<tr><th class="block" colspan="2">Miscellaneous Info</th></tr>
<tr>
<th class="label">Languages spoken:
<img class="form_info_icon" src="http://www.mysite.com/templates/tmpl_uni/images/icons/info.gif"
onmouseover="showFloatDesc('Enter your main language');"
onmousemove="moveFloatDesc( event )" onmouseout="hideFloatDesc()" /></th>
<td><input type="text" class="input_text" name="Lang_Spoken[0]" value="" /><img src="http://www.mysite.com/templates/tmpl_uni/images/icons/warn.gif" class="form_warn_icon" style="display: none;" onmousemove="moveFloatDesc(event)" onmouseout="hideFloatDesc()" /></td></tr>
<tr><th class="block" colspan="2"> </th></tr>
<tr>
<td colspan="3" class="form_row_special">
<input type="checkbox" name="TermsOfUse" value="yes" id="TermsOfUse_agree" />
<label for="TermsOfUse_agree">
I have read and agreed with <a href="terms_of_use.php" target="_blank">terms of use</a>.</label></td></tr>
<tr><th class="bottom_controls" colspan="2"><input type="submit" value="Submit" class="input_submit" /></th></tr></table></form>
Thank you very much.



News