| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| Timmah I post too much
 
  Reputation: 0 
 Joined: 23 Nov 2008
 Posts: 2405
 Location: Here but not over there, There but somewhere
 
 | 
			
				|  Posted: Mon Mar 02, 2009 4:36 pm    Post subject: I have A |   |  
				| 
 |  
				| I have a website coded in HTML.  I want to add a password to the website. 
 What code should I use?
 _________________
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Flyte Peanuts!!!!
 
  Reputation: 6 
 Joined: 19 Apr 2006
 Posts: 1887
 Location: Canada
 
 | 
			
				|  Posted: Mon Mar 02, 2009 5:09 pm    Post subject: |   |  
				| 
 |  
				| You should use php. Also, you posted this in the wrong section. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| nwongfeiying Grandmaster Cheater
 
 ![]() Reputation: 2 
 Joined: 25 Jun 2007
 Posts: 695
 
 
 | 
			
				|  Posted: Mon Mar 02, 2009 5:09 pm    Post subject: |   |  
				| 
 |  
				| Wrong section.. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Timmah I post too much
 
  Reputation: 0 
 Joined: 23 Nov 2008
 Posts: 2405
 Location: Here but not over there, There but somewhere
 
 | 
			
				|  Posted: Mon Mar 02, 2009 7:45 pm    Post subject: |   |  
				| 
 |  
				|  	  | Flyte wrote: |  	  | You should use php. Also, you posted this in the wrong section. | 
 
 Sorry, I'm new to this section.
 _________________
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kosstr12 Master Cheater
 
 ![]() Reputation: -1 
 Joined: 12 Jul 2008
 Posts: 339
 
 
 | 
			
				|  Posted: Mon Mar 02, 2009 8:29 pm    Post subject: |   |  
				| 
 |  
				| You should use php, unless you're running a really low security website. In which case you could do it with javascript like this: 
  	  | Code: |  	  | <script type="text/javascript"> var corpass = prompt("What is the password for this site?");
 if(corpass=="mypassword")
 {
 window.location("http://google.com")
 }
 else
 {
 alert("Please refresh the page and enter the correct password.")
 }
 </script>
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Localhost I post too much
 
  Reputation: 0 
 Joined: 28 Apr 2007
 Posts: 3402
 
 
 | 
			
				|  Posted: Mon Mar 02, 2009 8:46 pm    Post subject: |   |  
				| 
 |  
				|  	  | kosstr12 wrote: |  	  | You should use php, unless you're running a really low security website. In which case you could do it with javascript like this: 
  	  | Code: |  	  | <script type="text/javascript"> var corpass = prompt("What is the password for this site?");
 if(corpass=="mypassword")
 {
 window.location("http://google.com")
 }
 else
 {
 alert("Please refresh the page and enter the correct password.")
 }
 </script>
 | 
 | 
 
 Only if you want EVERYONE to be able to access it...
 
 PHP or Web Python.
 _________________
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Reak I post too much
 
  Reputation: 0 
 Joined: 15 May 2007
 Posts: 3496
 
 
 | 
			
				|  Posted: Wed Mar 04, 2009 9:23 am    Post subject: |   |  
				| 
 |  
				| Or .htaccess. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |