Jump to content

Archived

This topic is now archived and is closed to further replies.

likwidmonster

How do you make user acounts and user login on a website

Recommended Posts

I ,am very confused I have just started in JavaScript. I ,am using a sub-domain so that is why I ,am not using php. ??? Please Help!!!

Share this post


Link to post
Share on other sites

You can't. You need to use a server-side language.

 

Actually, theoretically you could do it by creating a csv file on the server that holds everyone's usernames and passwords, then use an AJAX request to get the contents of the file, and read through them until you find a set that matches the current user. But it would be extremely insecure, and fairly difficult to write.

 

The verdict - you need a server-side language. PHP, ASP, PERL whatever you want. But Javascript is not server-side.

Share this post


Link to post
Share on other sites

The fact that you are ona sub-domain does not preclude you from using PHP or any other server-side language. Don't rely on JavaScript for any type of login system.

Share this post


Link to post
Share on other sites

Yes, there is nothing you can't do on a sub-domain that you can do on a domain. In fact a "domain" is in fact a sub-domain as well.

 

php.net is a sub-domain of the TLD (Top Level Domain) .net

Share this post


Link to post
Share on other sites

I think what he is referring to when saying he is a sub-domain, is that he doesn't have administrative access to the inner workings of the domain (for things like creating databases etc).

Share this post


Link to post
Share on other sites

Well, then he is using the wrong terminology. In the first post the OP stated he couldn't even use PHP. If that is the case (and there is no other server-side code that can be used) then he is SOL.

Share this post


Link to post
Share on other sites

i figured out that the server is a linix server. It is a linix server because they're faster then the other one's! Is there any language for a linix server for a forum?

Share this post


Link to post
Share on other sites

It depends on what was installed on the server. Could be it supports PHP, Python, or any number of server-side languages.

Share this post


Link to post
Share on other sites

No, for two reasons. The first is that flash also requires javascript to be enabled in order for it to work. The second is that you can only create the user interface with flash - you will still need a serverside language to do the processing to log the person in or out.

Share this post


Link to post
Share on other sites

It depends on what languages your server is set up for. But PHP and ASP are common, and this here is a PHP forum before a javascript forum.

Share this post


Link to post
Share on other sites

here's a test for you!

make a new page (if you even have that much access) called php_test.html

and inside that page put the following code.

<?php
echo "PHP IS WORKING!
?>

when you save the page and load it and see:

<?php
echo "PHP IS WORKING!
?>

then it isn't working

if you save and load the page and see:

PHP IS WORKING

then your server has PHP on it

 

-Zack

Share this post


Link to post
Share on other sites

With that method it will show

 

<?php
echo "PHP IS WORKING!
?>

 

whether he has PHP installed or not.

 

Save the file name as 'php_test.php', not 'php_test.html'.

Share this post


Link to post
Share on other sites

haku, all the servers ive used have had PHP installed so it works on any page as long as there are <? ?>

sorry i forgot about that

Share this post


Link to post
Share on other sites

The huge majority of servers have to be configured to recognize php in any file that doesn't end with a .php extension. Since the example you gave used a .html extension, it wont render the page.

Share this post


Link to post
Share on other sites

you don't get it! I don't have a server, I, am using a sub-domain off of my teacher because I, am friends with him. I can ftp to the sub-domain.

Share this post


Link to post
Share on other sites

I guess I need to re-state what I stated on the previous page (with one addition):

The fact that you are on a sub-domain does not preclude you from using PHP or any other server-side language assuming it is supported on the server.

 

You are getting way too caught up on this "sub-domain" thing. If the server supoprts PHP, then it supports PHP. I create sub-domins all the time and, guess what?, those sub-domains support PHP without me having to do anything else. I'm sure there may be a way to disable PHP for a sub-diomain, but it would be the exception and not the norm. Did you even try any of the suggestions above to see if PHP is enabled?

 

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.