I feel like this should be pretty simple, but I'm not getting the results that I want. I have an email signup form that displays across all my websites. If they happen to visit my website with the store code ama_br the email signup disappears. That is fine and that works. My elseif statement is a different form than the one that is displayed across all store views and I want this new form to only appear when it's store code ama_ca. It does not work for me and I don't see anything wrong with my code. Please help. Thank you.
<?php if (Mage::app()->getStore()->getCode() != "ama_br"):?>
<ul>
<li><?php echo $this->__('Email Sign Up')?></li>
<li>
<form action="<?php echo $this->getUrl('email_preferences')?>" method="get" id="newsletter-validate-detail">
<input name="email" type="text" id="newsletter" placeholder="<?php echo $this->__('Enter Email address')?>" title="<?php echo $this->__('Enter Email address')?>' class="required-entry validate-email">
<button class="submit">+</button>
<input type="hidden" name="source" value="nt">
</form>
</li>
<li class="footer-promo"><?php echo $this->getChildHtml('footer_promo')?></li>
</ul>
<?php elseif (Mage::app()->getStore()->getCode() == "ama_ca"):?>
<ul>
<li><?php echo $this->__('Email Sign Up')?></li>
<li>
<form method="post" action="http://enews.******.com/q/9MNK4U4iV9Mutb9YzTxF2zRWDIPgKoX0F0" accept-charset="UTF-8">
<input type="hidden" name="crvs" value="6hZNXcISD79ac2Empmsr2az_B3Qc5osTNmkOdNHleqhPIYmsxEOe6PbgaUo-3WBn_Vbgorrbk4qjekx7w4tljA">
<input type="hidden" name="CheckBox.Source.ca_footer" value="on">
<input name="email" type="text" id="newsletter" placeholder="Enter Email address" title="Enter Email address' class=" required-entry="">
<input type="hidden" id="submit" value="Sign Up">
</form>
</li>
<li class="footer-promo"><?php echo $this->getChildHtml('footer_promo')?></li>
</ul>
<?php endif;?>
Description
You have done every thing right but you just miss the trick look carefully on your if statement Logic that is if your Code not equals to ama_br that is it can be equal to ama_ca so it will show the form in if statement for ama_ca as well as on any other string from ama_br so the form you are trying to show on Code equals to ama_ca is not showing. Try one of the following it will resolve your query.
Code
<?php if (Mage::app()->getStore()->getCode() == "ama_ca"): ?>
<ul>
<li><?php echo $this->__('Email Sign Up') ?></li>
<li>
<form method="post" action="http://enews.******.com/q/9MNK4U4iV9Mutb9YzTxF2zRWDIPgKoX0F0" accept-charset="UTF-8">
<input type="hidden" name="crvs" value="6hZNXcISD79ac2Empmsr2az_B3Qc5osTNmkOdNHleqhPIYmsxEOe6PbgaUo-3WBn_Vbgorrbk4qjekx7w4tljA">
<input type="hidden" name="CheckBox.Source.ca_footer" value="on">
<input name="email" type="text" id="newsletter" placeholder="Enter Email address" title="Enter Email address' class=" required-entry="">
<input type="hidden" id="submit" value="Sign Up">
</form>
</li>
<li class="footer-promo"><?php echo $this->getChildHtml('footer_promo') ?></li>
</ul>
<?php elseif (Mage::app()->getStore()->getCode() != "ama_br"): ?>
<ul>
<li><?php echo $this->__('Email Sign Up') ?></li>
<li>
<form action="<?php echo $this->getUrl('email_preferences') ?>" method="get" id="newsletter-validate-detail">
<input name="email" type="text" id="newsletter" placeholder="<?php echo $this->__('Enter Email address') ?>" title="<?php echo $this->__('Enter Email address') ?>' class="required-entry validate-email">
<button class="submit">+</button>
<input type="hidden" name="source" value="nt">
</form>
</li>
<li class="footer-promo"><?php echo $this->getChildHtml('footer_promo') ?></li>
</ul>
<?php endif; ?>
OR
<?php if (Mage::app()->getStore()->getCode() != "ama_br" && Mage::app()- >getStore()->getCode() != "ama_ca"): ?>
<ul>
<li><?php echo $this->__('Email Sign Up') ?></li>
<li>
<form action="<?php echo $this->getUrl('email_preferences') ?>" method="get" id="newsletter-validate-detail">
<input name="email" type="text" id="newsletter" placeholder="<?php echo $this->__('Enter Email address') ?>" title="<?php echo $this->__('Enter Email address') ?>' class="required-entry validate-email">
<button class="submit">+</button>
<input type="hidden" name="source" value="nt">
</form>
</li>
<li class="footer-promo"><?php echo $this->getChildHtml('footer_promo') ?></li>
</ul>
<?php elseif (Mage::app()->getStore()->getCode() == "ama_ca"): ?>
<ul>
<li><?php echo $this->__('Email Sign Up') ?></li>
<li>
<form method="post" action="http://enews.******.com/q/9MNK4U4iV9Mutb9YzTxF2zRWDIPgKoX0F0" accept-charset="UTF-8">
<input type="hidden" name="crvs" value="6hZNXcISD79ac2Empmsr2az_B3Qc5osTNmkOdNHleqhPIYmsxEOe6PbgaUo-3WBn_Vbgorrbk4qjekx7w4tljA">
<input type="hidden" name="CheckBox.Source.ca_footer" value="on">
<input name="email" type="text" id="newsletter" placeholder="Enter Email address" title="Enter Email address' class=" required-entry="">
<input type="hidden" id="submit" value="Sign Up">
</form>
</li>
<li class="footer-promo"><?php echo $this->getChildHtml('footer_promo') ?></li>
</ul>
<?php endif; ?>
Related
I am creating a form using html and php, inside this form I have date input "from" and date input "to".
How can "to" get update with the date I select in "from"?
For example, if I select in the "from" July 1st, I want "to" to get update with the same date or the next day.
This is my form:
<?php ob_start() ?>
<?php if(isset($params['message'])) :?>
<b><span style="color: red;"><?php echo $params['message'] ?></span></b>
<?php endif; ?>
<?php
date_default_timezone_set('America/Costa_Rica');
?>
<br/>
<form name="formInsertDocument" action="index.php?ctl=insertDocument" autocomplete="off" method="POST">
<h2>Insert New Document</h2>
<fieldset>
<ul>
<li>
<label for="name">Type:</label>
<input type="number" name="id_type" required value="<?php echo $params['id_type'] ?>" />
</li>
<li>
<label for="name">Client:</label>
<input type="number" name="id_client" required value="<?php echo $params['id_client'] ?>" />
</li>
<li>
<label for="name">Date:</label>
<input type="date" name="date_document" required value="<?php echo date('Y-m-d'); ?>" value="<?php echo $params['date_document'] ?>" />
</li>
<li>
<label for="name">Arrival:</label>
<input type="date" name="date_arrival" required value="<?php echo date('Y-m-d'); ?>" value="<?php echo $params['date_arrival'] ?>" />
</li>
<li>
<label for="name">Departure:</label>
<input type="date" name="date_leaving" required value="<?php echo date('Y-m-d'); ?>" value="<?php echo $params['date_leaving'] ?>" />
</li>
<li>
<label for="name">Subtotal:</label>
<input type="number" name="subtotal" required value="<?php echo $params['subtotal'] ?>" />
</li>
<li>
<label for="name">Taxable:</label>
<input type="number" name="taxable" required value=00000000 value="<?php echo $params['taxable'] ?>" />
</li>
<li>
<label for="name">Tax:</label>
<input type="number" name="tax" value=00000000 value="<?php echo $params['tax'] ?>" />
</li>
<li>
<label for="name">Other:</label>
<input type="number" name="other" required value="<?php echo $params['other'] ?>" />
</li>
<li>
<label for="name">Total:</label>
<input type="number" name="total" required value=0 value="<?php echo $params['total'] ?>" />
</li>
</ul>
</fieldset>
<input type="submit" value="Insert" name="insert" />
</form>
<?php $contenido = ob_get_clean() ?>
<?php include '../app/templates/layout.php' ?>
With javascript you'll have to use something like this:
<script>
var date_arrival = document.getElementsByName('date_arrival')[0];
var date_leave = document.getElementsByName('date_leave')[0];
date_arrival.addEventListener('change', function() {
date_leave.value = date_arrival.value;
});
</script>
<!doctype html>
<?php
This is for setting cookies
//first failed attempt
if (isset($_POST['firstname']) != null || isset($_POST['lastname']) != null ||
isset($_POST['phonenumber']) != null || isset($_POST['email']) != null
|| isset($_POST['sulleyaddress']) != null || isset($_POST['question1']) != null
|| isset($_POST['question2']) != null || isset($_POST['question3']) != null
|| isset($_POST['question4']) != null || isset($_POST['question5']) != null) {
setcookie('firstname',$_POST['firstname']);
setcookie('lastname',$_POST['lastname']);
setcookie('phonenumber',$_POST['phonenumber']);
setcookie('email',$_POST['email']);
setcookie('sulleyaddress',$_POST['sulleyaddress']);
setcookie('question1',$_POST['question1']);
setcookie('question2',$_POST['question2']);
setcookie('question3',$_POST['question3']);
setcookie('question4',$_POST['question4']);
setcookie('question5',$_POST['question5']);
}
this is for reseting cookies
//second failed attempt
if (isset($_POST['firstname']) == null) {
setcookie('firstname','');
}
if (isset($_POST['lastname']) == null) {
setcookie('lastname','');
}
if (isset($_POST['phonenumber']) == null) {
setcookie('phonenumber','');
}
if (isset($_POST['email']) == null) {
setcookie('email','');
}
if (isset($_POST['sulleyaddress']) == null) {
setcookie('sulleyaddress','');
}
if (isset($_POST['question1']) == null) {
setcookie('question1','');
}
if (isset($_POST['question2']) == null) {
setcookie('question2','');
}
if (isset($_POST['question3']) == null) {
setcookie('question3','');
}
if (isset($_POST['question4']) == null) {
setcookie('question4','');
}
if (isset($_POST['question5']) == null) {
setcookie('question5','');
}
?>
<html>
<head>
<title>Assignment 2 - Anthony Taveras</title>
<style>#import url("css/styles.css");</style>
<!-- <link rel="stylesheet" href="styles.css" /> -->
</head>
<body>
<?php
1st step. Make the form appear. Allow user to enter and submit data.
if (!isset($_POST['submit'])) {
?>
<div id="content-container">
<div id="content">
<form name="form" id="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<fieldset>
<legend>Please Fill Out the Form</legend>
<ol>
<li><input type="text" name="firstname" value="<?php if (isset($_COOKIE['firstname'])) {echo $_COOKIE['firstname'];} ?>" ><label> First Name</label></li>
<li><input type="text" name="lastname" value="<?php if (isset($_COOKIE['lastname'])) {echo $_COOKIE['lastname'];} ?>" ><label> Last Name</label></li>
<li><input type="text" name="phonenumber" value="<?php if (isset($_COOKIE['phonenumber'])) {echo $_COOKIE['phonenumber'];} ?>" ><label> Phone Number</label></li>
<li><input type="text" name="email" value="<?php if (isset($_COOKIE['email'])) {echo $_COOKIE['email'];} ?>" ><label> Email</label></li>
<li><input type="text" name="sulleyaddress" value="<?php if (isset($_COOKIE['sulleyaddress'])) {echo $_COOKIE['sulleyaddress'];} ?>" ><label> Sulley Address</label></li>
</ol>
</fieldset>
<fieldset>
<legend>Please answer these questions</legend>
<ol>
<li class="question"><input type="text" name="question1" value="<?php if (isset($_COOKIE['question1'])) {echo $_COOKIE['question1'];} ?>" ><label> What is your favorite color?</label></li>
<li class="question"><input type="text" name="question2" value="<?php if (isset($_COOKIE['question2'])) {echo $_COOKIE['question2'];} ?>" ><label> Where were you born?</label></li>
<li class="question"><input type="text" name="question3" value="<?php if (isset($_COOKIE['question3'])) {echo $_COOKIE['question3'];} ?>" ><label> What is your favorite food?</label></li>
<li class="question"><input type="text" name="question4" value="<?php if (isset($_COOKIE['question4'])) {echo $_COOKIE['question4'];} ?>" ><label> What is your favorite movie?</label></li>
<li class="question"><input type="text" name="question5" value="<?php if (isset($_COOKIE['question5'])) {echo $_COOKIE['question5'];} ?>" ><label> What is your favorite book?</label></li>
<li><input type="submit" name="submit" value="Submit" /></li>
</ol>
</fieldset>
</form>
</div>
</div>
2nd step once submitted user can view responses
<?php
} elseif (isset($_POST['submit'])) {
?>
<!--=============================================Form Preview--------------------------------------->
<div id="content-container">
<div id="content">
<h1> Here's what you put down</h1>
<p> First Name: <?php print $_POST['firstname']; ?> </p>
<p> Last Name: <?php print $_POST['lastname']; ?> </p>
<p> Phone Number: <?php print $_POST['phonenumber']; ?> </p>
<p> Email: <?php print $_POST['email']; ?> </p>
<p> Sulley Address: <?php print $_POST['sulleyaddress']; ?> </p>
<p class="question"> What is your favorite color? <?php print $_POST['question1']; ?> </p>
<p class="question"> Where were you born? <?php print $_POST['question2']; ?> </p>
<p class="question"> What is your favorite food? <?php print $_POST['question3']; ?> </p>
<p class="question"> What is your favorite movie? <?php print $_POST['question4']; ?> </p>
<p class="question"> What is your favorite book? <?php print $_POST['question5']; ?> </p>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="submit" name="edit" value="Edit" />
</form>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="submit" name="confirm" value="Finish" />
</form>
</div>
</div>
This is the problem area. This last step of the if else statement will not work properly. I'm not sure why. Any help is needed. Thanks.
<?php } elseif (isset($_POST['confirm'])) {
?>
<!--=============================================Form Confirmed--------------------------------------->
<div id="content-container">
<div id="content">
<p> Thank you, your data has been submitted</p>
</div>
</div>
<?php }
?>
</body>
</html>
You've got two form tags. One has the submit, one the hidden field.
You're not passing the variable therefore.
Try troubleshooting!
echo '<pre>';
print_r($_POST);
I would guess that it is because the forms are empty.
Try:
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input id='placeholder' name='placeholder' type='text' value='placeholder' hidden>
<input type="submit" name="confirm" value="Finish" />
</form>
I'm using the Mingle plugin for Wordpress for users to register, so they can post on a Mingle Forum.
The signup process works, but I want to redirect the user to the forum page once they have submitted their details, rather than just staying on the signup page.
I've tried adding <input type="hidden" name="redirect_to" value="<?php echo bloginfo('url'); ?>" /> to the code so that the page redirects (as it worked on the login form), but doesn't seem to work with signup form.
I've tried using the "action" function in the form details too; this redirects the page, but doesn't submit the data.
The page's code is below - would really appreciate a solution, if possible! Thanks.
<form name="registerform" id="registerform" method="post">
<input type="hidden" id="mngl-process-form" name="mngl-process-form" value="Y" />
<input type="hidden" name="redirect_to" value="http://creativespotlights.com/forum" action="http://creativespotlights.com/forum" />
<p>
<label><?php _e('Username', 'mingle'); ?>*:<br />
<input type="text" name="user_login" id="user_login" class="input mngl_signup_input" value="<?php echo $user_login; ?>" size="20" tabindex="200" /></label>
</p>
<p>
<label><?php _e('E-mail', 'mingle'); ?>*:<br />
<input type="text" name="user_email" id="user_email" class="input mngl_signup_input" value="<?php echo $user_email; ?>" size="25" tabindex="300" /></label>
</p>
<?php if(isset($mngl_options->field_visibilities['signup_page']['name'])) { ?>
<p>
<label><?php _e('First Name', 'mingle'); ?>:<br />
<input type="text" name="user_first_name" id="user_first_name" class="input mngl_signup_input" value="<?php echo $user_first_name; ?>" size="20" tabindex="400" /></label>
</p>
<p>
<label><?php _e('Last Name', 'mingle'); ?>:<br />
<input type="text" name="user_last_name" id="user_last_name" class="input mngl_signup_input" value="<?php echo $user_last_name; ?>" size="20" tabindex="500" /></label>
</p>
<?php } ?>
<?php if(isset($mngl_options->field_visibilities['signup_page']['url'])) { ?>
<p>
<label><?php _e('Website', 'mingle'); ?>:<br />
<input type="text" name="mngl_user_url" id="mngl_user_url" value="<?php echo $mngl_user_url; ?>" class="input mngl_signup_input" size="20" tabindex="600"/></label>
</p>
<?php } ?>
<?php if(isset($mngl_options->field_visibilities['signup_page']['location'])) { ?>
<p>
<label><?php _e('Location', 'mingle'); ?>:<br />
<input type="text" name="mngl_user_location" id="mngl_user_location" value="<?php echo $mngl_user_location; ?>" class="input mngl_signup_input" size="20" tabindex="700" /></label>
</p>
<?php } ?>
<?php if(isset($mngl_options->field_visibilities['signup_page']['bio'])) { ?>
<p>
<label><?php _e('Bio', 'mingle'); ?>:<br />
<textarea name="mngl_user_bio" id="mngl_user_bio" class="input mngl-growable mngl_signup_input" tabindex="800"><?php echo wptexturize($mngl_user_bio); ?></textarea></label>
</p>
<?php } ?>
<?php if(isset($mngl_options->field_visibilities['signup_page']['sex'])) { ?>
<p>
<label><?php _e('Gender', 'mingle'); ?>*: <?php echo MnglProfileHelper::sex_dropdown('mngl_user_sex', $mngl_user_sex, '', 900); ?></label>
</p>
<?php } ?>
<?php if(isset($mngl_options->field_visibilities['signup_page']['password'])) { ?>
<p>
<label><?php _e('Password', 'mingle'); ?>:<br/>
<input type="password" name="mngl_user_password" id="mngl_user_password" class="input mngl_signup_input" tabindex="1000"/></label>
</p>
<p>
<label><?php _e('Password Confirmation', 'mingle'); ?>:<br />
<input type="password" name="mngl_user_password_confirm" id="mngl_user_password_confirm" class="input mngl_signup_input" tabindex="1100"/></label>
</p>
<?php } else { ?>
<p id="reg_passmail"><?php _e('A password will be e-mailed to you.', 'mingle'); ?></p>
<?php } ?>
<?php if($mngl_options->signup_captcha) { ?>
<?php
$captcha_code = MnglUtils::str_encrypt(MnglUtils::generate_random_code(6));
?>
<p>
<label><?php _e('Enter Captcha Text', 'mingle'); ?>*:<br />
<img src="<?php echo MNGL_SCRIPT_URL; ?>&controller=captcha&action=display&width=120&height=40&code=<?php echo $captcha_code; ?>" /><br/>
<input id="security_code" name="security_code" style="width:120px" type="text" tabindex="1200" />
<input type="hidden" name="security_check" value="<?php echo $captcha_code; ?>">
</p>
<?php } ?>
<?php do_action('mngl-user-signup-fields'); ?>
<br class="clear" />
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="mngl-share-button" value="<?php _e('Sign Up', 'mingle'); ?>" tabindex="60" />
</p>
</form>
Try this
<?php
if (isset($_POST['wp-submit']))
{
header('Location: http://site/result.php');
}
?>
in the top of your code
OR you can try to do it by javascript with onsubmit="window.location.href='result.php';"
You can use :
header('Location: http://yoursite.com/location.php');
But you have to get a clean output (no html before the header).
Doc here.
Something like this should work:
if (isset($_POST['user_login']))
{
(your redirect code here)
}
After a form has been successfully submitted you should perform a 303 redirect to the same page. Doing this will prevent resubmitting the form if the user happens to press F5 or some other form or reloading the page.
wp_redirect("/path/to/my/script", 303);
You will need to substitute /path/to/my/script with the URL where your form lives.
This isthe form which i am submitting it through on click on text, but the values are not passing on the action page.
<form action="forget_pass.php" method="post" id="new_user" name="new_user">
<ul class="inputlist">
<li><span class="redcolor">*</span>Email Address or Phone No.</li>
<li>
<input name="" class="inputbox" type="text" name="EmailAddress" id="txtEmail" />
</li>
<li class="rightalign">
<a href="javascript:document.new_user.submit();" onclick="">
Retrieve Password</a></li>
</form>
<input name="" class="inputbox" type="text" name="EmailAddress" id="txtEmail" />
Should be
<input class="inputbox" type="text" name="EmailAddress" id="txtEmail" />
-
<a href="javascript:document.new_user.submit();" onclick="">
should be better to be
<a href="#" onclick="document.new_user.submit();return false;">
here is the working code you can use
<form action="forget_pass.php" method="post" id="new_user" name="new_user">
<ul class="inputlist">
<li><span class="redcolor">*</span>Email Address or Phone No.</li>
<li>
<input class="inputbox" type="text" name="EmailAddress" id="txtEmail" />
</li>
<li class="rightalign">
<a href="javascript:document.new_user.submit();">
Retrieve Password</a></li>
</form>
Problems in your code are
1- you have two name attributes. one is empty
2- onclick not used properly...
Hope it helps
You should try this code,
<form action="forget_pass.php" method="post" id="new_user" name="new_user">
<ul class="inputlist">
<li><span class="redcolor">*</span>Email Address or Phone No.</li>
<li>
<input class="inputbox" type="text" name="emailAddress" id="txtEmail" >
</li>
<li class="rightalign">
<a href="javascript:submitForm();">
Retrieve Password</a></li>
</ul>
</form>
And the javaScript code is,
submitForm = function(){
alert(document.forms[0].emailAddress.value);
document.forms[0].submit();
}
And the running code is this http://jsfiddle.net/4AWW6/
Evry time while logging in an error "INVALID TOKEN" its shown at the joomla2.5/jomsocial2.4 site, but after 2,3 refreshes it shows the profile page as logged in... why is it so.... Is it problem of Joomla... I have uninstalled a plugin alphauserpoints ... is that a problem.. or should i modify the code default.php
<?php
// no direct access
defined('_JEXEC') or die;
JHtml::_('behavior.keepalive');
?>
<?php if ($type == 'logout') : ?>
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form">
<?php if ($params->get('greeting')) : ?>
<div class="login-greeting">
<?php if($params->get('name') == 0) : {
echo JText::sprintf('MOD_LOGIN_HINAME', $user->get('name'));
} else : {
echo JText::sprintf('MOD_LOGIN_HINAME', $user->get('username'));
} endif; ?>
</div>
<?php endif; ?>
<div class="logout-button">
<input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGOUT'); ?>" />
<input type="hidden" name="option" value="com_users" />
<input type="hidden" name="task" value="user.logout" />
<input type="hidden" name="return" value="<?php echo $return; ?>" />
<?php echo JHtml::_('form.token'); ?>
</div>
</form>
<?php else : ?>
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form" >
<?php if ($params->get('pretext')): ?>
<div class="pretext">
<p><?php echo $params->get('pretext'); ?></p>
</div>
<?php endif; ?>
<fieldset class="userdata">
<p id="form-login-username">
<label for="modlgn-username"><?php echo JText::_('MOD_LOGIN_VALUE_USERNAME') ?></label>
<input id="modlgn-username" type="text" name="username" class="inputbox" size="18" />
</p>
<p id="form-login-password">
<label for="modlgn-passwd"><?php echo JText::_('JGLOBAL_PASSWORD') ?></label>
<input id="modlgn-passwd" type="password" name="password" class="inputbox" size="18" />
</p>
<?php if (JPluginHelper::isEnabled('system', 'remember')) : ?>
<p id="form-login-remember">
<label for="modlgn-remember"><?php echo JText::_('MOD_LOGIN_REMEMBER_ME') ?></label>
<input id="modlgn-remember" type="checkbox" name="remember" class="inputbox" value="yes"/>
</p>
<?php endif; ?>
<input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGIN') ?>" />
<input type="hidden" name="option" value="com_users" />
<input type="hidden" name="task" value="user.login" />
<input type="hidden" name="return" value="<?php echo $return; ?>" />
<?php echo JHtml::_('form.token'); ?>
</fieldset>
<ul>
<li>
<a href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>">
<?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_PASSWORD'); ?></a>
</li>
<li>
<a href="<?php echo JRoute::_('index.php?option=com_users&view=remind'); ?>">
<?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_USERNAME'); ?></a>
</li>
<?php
$usersConfig = JComponentHelper::getParams('com_users');
if ($usersConfig->get('allowUserRegistration')) : ?>
<li>
<a href="<?php echo JRoute::_('index.php?option=com_users&view=registration'); ?>">
<?php echo JText::_('MOD_LOGIN_REGISTER'); ?></a>
</li>
<?php endif; ?>
</ul>
<?php if ($params->get('posttext')): ?>
<div class="posttext">
<p><?php echo $params->get('posttext'); ?></p>
</div>
<?php endif; ?>
or does the uninstallation affected the configuration file of joomla
Try this link: http://developersbench.in/invalid-token-during-registration-jomsocial/#.T19wtHm45F0 . You might get some help from this.
The info i have about this is every time you open a page and submit a form it first validates the token and if token is expired which is mainly because of remaining idle on the page for a few time, then you get "Invalid token" error.
Simply if you are not worried about the token, go to the file root/libraries/joomla/environment/request.php and check the below function
function checkToken( $method = 'post' ), comment all the lines between this and simply return true, whatever be the case. I haven't tried this, but i guess this will work.