/    Sign up×
Community /Pin to ProfileBookmark

hide unhide form

Below is code that I’m trying to edit so that when the link is clicked the form is shown and when the link is clicked a second time the form will be hidden

any idea how I can do this

[code=php]
<p style=”font-size:10px”><a href=”index.php?pw_id=pw”>Get new Password</a></p>

<?PHP
// displays the lost password form
$pw_id = $_REQUEST[‘pw_id’];

if ($pw_id == ‘pw’){ ?>
<form id=”form1″ name=”form1″ method=”post” action=”codeLostPassword.php”>

Email Address:
<input type=”text” name=”email_address” id=”email_address” />
<input name=”recover” id=”recover” type=”hidden” value=”recover” />

<input type=”submit” name=”Submit” value=”Submit” id=”Submit” />
</form>
<?php }else{
}
?>
[/code]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@so_is_thisDec 16.2006 — [code=php]<?php
// displays the lost password form
$pw_id = $_REQUEST['pw_id'];

if ($pw_id == 'pw')
{
?>
<p style="font-size:10px"><a href="index.php?pw_id=no">Keep Current Password</a></p>

<form id="form1" name="form1" method="post" action="codeLostPassword.php">
<p>Email Address:
<input type="text" name="email_address" id="email_address" />
<input name="recover" id="recover" type="hidden" value="recover" />
</p>
<p>
<input type="submit" name="Submit" value="Submit" id="Submit" />
</p>
</form>
<?php
}else{
?>
<p style="font-size:10px"><a href="index.php?pw_id=pw">Get New Password</a></p>
<?php
}
?>[/code]
×

Success!

Help @kproc spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...