one php page extending how ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nagapraveen
Forum Newbie
Posts: 3
Joined: Wed Apr 08, 2009 1:10 am

one php page extending how ?

Post by nagapraveen »

one webpage contain login fields and below one opton that is register when ever click register that page extend and displaying register fields give me that javascript code or php code
watson516
Forum Contributor
Posts: 198
Joined: Mon Mar 20, 2006 9:19 pm
Location: Hamilton, Ontario

Re: one php page extending how ?

Post by watson516 »

All right, I don't really understand anything you just typed so I am going to guess that you want a login page that has a link that, when clicked, will show a hidden registration form below it. Correct?

You could use javascript to accomplish this. When you create the page, put the registration form into a div and add style="display:none;" and then using javascript, change the display to block and you're good to go. Im not the best with javascript but something like this might work

Code: Select all

<script type="text/javascript">
function displayReg() {
    document.getElementById('registration-form').style.display = "block";
}
</script>
...
<a href="#" onclick="displayReg()">Register</a>
<div id="registration-form" style="display:none;"></div>
Post Reply