I am writing a php file, where I want to display a different content within an existing html element when a get variable is set.
Now what i want is to set the word " Password Reset Was Success" instead of "Enter your Email to reset the password" or add a new <p>
tag containing the required words by hiding current <p>
tag when the GET variable is set. But I have no idea of how to do this. I checked different times, but I failed. I really appreciate if some one can help me to do this.
here is my code.
<div class="login-box-body">
<!--Want to replace this text as Password Reset Was Success or add a new <p> tag containing the required words by hiding current <p> tag -->
<p class="login-box-msg">Enter your Email to reset the password</p>
<?php require '_inc/msg.php' ?>
<!-- Check if GET variable is set or not -->
<?php if (isset($_GET['code'])) {
echo '<style>.formPsw{ display:none;}</style>';
} ?>
<form action="" method="post" class="formPsw">
<div class="form-group has-feedback emailBox" >
<input type="email" name="email" class="form-control" placeholder="Email" data-validation="email required">
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-8">
</div>
<!-- /.col -->
<div class="col-xs-4 sendEmailBtn">
<input type="submit" name="send" class="btn btn-primary btn-block btn-flat" value="send"/>
</div>
<!-- /.col -->
</div>
</form>
<?php if (!empty($_POST['send'])) {
echo 'Please check your email ('.$_POST['email'].'). We send password reset link to your email.';
} ?>
</div>