Problems with html coding?

Michael

New member
I am setting up a web page for a games group and i want to be able to code my pages to show 1 of 2 members depending on whether the user is a member or not.
Since I am just learning web coding i was wonder if some kind person would help me with my code: the error part are marked by **. thanks

<!-- Menu START -->
**get value of userIsMember
**if userIsMember = true then <h1 class="hidden"> else <h2
** class="hidden"> end if <h1>Menu <br />
<a href="/index.html" class="style3">Home Page</a><br />
<a href="/who-we-r.html" class="style3">Who we are and what we are about.</a><br />
<a href="/history.html" class="style3">History of our Kinship.</a><br />
<a href="/philosophy.html" class="style3">Philosophy of our Kinship.</a><br />
<a href="/public_html/rules.html" class="style3">Rules of our Kinship.</a><br />
<a href="/application.html" class="style3">Application to join to theKinship.</a><br />
<a href="/feedback.html" class="style3">Feedback or Comments.</a><br />
</h1>
<br />
<h2>Menu <br />
<a href="/index.html" class="style3">Home Page</a><br />
<a href="/awards.html" class="style3">Awards</a><br />
<a href="/bank.html" class="style3">Bank</a><br />
<a href="/calendar.html" class="style3">Calendar</a><br />
<a href="/characters.html" class="style3">Characters</a><br />
<a href="/events.html" class="style3">Events</a><br />
<a href="/feedback.html" class="style3">Feedback.</a><br />
<a href="/gallery.html" class="style3">Gallery</a> <br/>
<a href="/groups.html" class="style3">Groups</a><br />
<a href="/polls.html" class="style3">Polls</a><br />
<a href="/raids.html" class="style3">Raids</a><br />
<a href="/ranks.html" class="style3">Ranks</a><br />
<a href="/shouts.html" class="style3">Shouts</a><br />
</h2>
<br />
<!-- Menu END -->

As you can see the idea is to hide one of the either menu 1 or menu 2 depending of the userIsMember status.

Thanks very much for your assistance

Michael
 
you will need to make a javascript code to handle a login (you can use google to find how to do the things i am going to say you need, these are fairly well documented languages), you will then send the login info (username password) to a php page located on your server. the php page will take the info and then display the correct page (split up the two separate menus into two separate pages). so ina more simple line:

press send>php page checks sent info>same php page redirects to another page depending on the info sent

this may not be what you are looking for (i am new to php and html and JavaScript too, but i have written something similar to this), but i hope it helps.

please just email me if you have any further questions, and i will do my best to help.
 
you will need to make a javascript code to handle a login (you can use google to find how to do the things i am going to say you need, these are fairly well documented languages), you will then send the login info (username password) to a php page located on your server. the php page will take the info and then display the correct page (split up the two separate menus into two separate pages). so ina more simple line:

press send>php page checks sent info>same php page redirects to another page depending on the info sent

this may not be what you are looking for (i am new to php and html and JavaScript too, but i have written something similar to this), but i hope it helps.

please just email me if you have any further questions, and i will do my best to help.
 
If I understand right, there are two things that you are not managing to get right. The first is setting up if someone is a member or not, and the second is using CSS hidden elements.

Creating a membership system is going to involve some scripting. You will need to learn something like php in order to do that. You can then set up a application page where a form is used to receive the application of new members, and then simply create one .txt file that gets amended each time with the id (using email is probably the best...if you use their ip address then your member can never log on from another computer. Anyway, all that is rather advanced stuff, especially if you are just learning html.

The switch between hidden and displayed section then would become rather a simple matter...which you could do with php or JavaScript (example shown) and just switch which peace of CSS gets imported. Here I've switched a whole CSS file, if you want to style up the whole thing different, but you could just switch a line too.)

<SCRIPT language="JavaScript">
<!--
var Membership=(get it's value from where you have created it);
if (Membership=="IsMember")
{
document.write('<link rel="stylesheet" type="text/css" href="style/Member.css" />');
}
else
{
document.write('<link rel="stylesheet" type="text/css" href="style/NotMember.css" />');
}

</SCRIPT>


The CSS is simple, just use h1.notMember{display:none} and h1.isMember{display:block}

Sources given below will help you get to that point. You should be sure that you have html and css well under your belt before getting to deep into JavaScript and PHP. What you are trying to do is a fairy advanced thing, and html is simply mark-up not programming.
 
you will need to make a javascript code to handle a login (you can use google to find how to do the things i am going to say you need, these are fairly well documented languages), you will then send the login info (username password) to a php page located on your server. the php page will take the info and then display the correct page (split up the two separate menus into two separate pages). so ina more simple line:

press send>php page checks sent info>same php page redirects to another page depending on the info sent

this may not be what you are looking for (i am new to php and html and JavaScript too, but i have written something similar to this), but i hope it helps.

please just email me if you have any further questions, and i will do my best to help.
 
you will need to make a javascript code to handle a login (you can use google to find how to do the things i am going to say you need, these are fairly well documented languages), you will then send the login info (username password) to a php page located on your server. the php page will take the info and then display the correct page (split up the two separate menus into two separate pages). so ina more simple line:

press send>php page checks sent info>same php page redirects to another page depending on the info sent

this may not be what you are looking for (i am new to php and html and JavaScript too, but i have written something similar to this), but i hope it helps.

please just email me if you have any further questions, and i will do my best to help.
 
If I understand right, there are two things that you are not managing to get right. The first is setting up if someone is a member or not, and the second is using CSS hidden elements.

Creating a membership system is going to involve some scripting. You will need to learn something like php in order to do that. You can then set up a application page where a form is used to receive the application of new members, and then simply create one .txt file that gets amended each time with the id (using email is probably the best...if you use their ip address then your member can never log on from another computer. Anyway, all that is rather advanced stuff, especially if you are just learning html.

The switch between hidden and displayed section then would become rather a simple matter...which you could do with php or JavaScript (example shown) and just switch which peace of CSS gets imported. Here I've switched a whole CSS file, if you want to style up the whole thing different, but you could just switch a line too.)

<SCRIPT language="JavaScript">
<!--
var Membership=(get it's value from where you have created it);
if (Membership=="IsMember")
{
document.write('<link rel="stylesheet" type="text/css" href="style/Member.css" />');
}
else
{
document.write('<link rel="stylesheet" type="text/css" href="style/NotMember.css" />');
}

</SCRIPT>


The CSS is simple, just use h1.notMember{display:none} and h1.isMember{display:block}

Sources given below will help you get to that point. You should be sure that you have html and css well under your belt before getting to deep into JavaScript and PHP. What you are trying to do is a fairy advanced thing, and html is simply mark-up not programming.
 
you will need to make a javascript code to handle a login (you can use google to find how to do the things i am going to say you need, these are fairly well documented languages), you will then send the login info (username password) to a php page located on your server. the php page will take the info and then display the correct page (split up the two separate menus into two separate pages). so ina more simple line:

press send>php page checks sent info>same php page redirects to another page depending on the info sent

this may not be what you are looking for (i am new to php and html and JavaScript too, but i have written something similar to this), but i hope it helps.

please just email me if you have any further questions, and i will do my best to help.
 
Back
Top