NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page HTML: Forms

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 01-06-2005, 11:50 AM THREAD STARTER               #1 (permalink)
mak
NamePros Member
Join Date: Jan 2005
Location: Michigan
Posts: 36
mak is an unknown quantity at this point
 



HTML: Forms


Alright, I'm trying to add forms to a site, so the site owners can post news, links, and additional things without doing any html work at all. I can make the forms, but I don't know how to make them work(this is my first time using forms).

First, I want a login page, just a password....or will I need a username too?:

Code:
<html>

	<head>
		<title>Admin Login</title>
	</head>

	<body bgcolor="#ffffff"><center><br><h2>Admin Login</h2>
		<form action="/enternews.html" method="get">
		<p>Password: <input type="password" name="psswd" size="20" maxlength="15"></p>
		<p><input type="submit" value="Submit" name="submit" size="20" maxlength="15"></p>
		</form>
	</center>
	</body>	

</html>

????: NamePros.com http://www.namepros.com/code/63534-html-forms.html
I'm not sure whether or not I use "get" or "post" for the form method and I don't know how to make it so it goes to "/enternews.html" if the password is correct and nor do I know how to set up the password. I think I might just keep the link to the enter news page private, so I don't have to do this login page.

Then, theres the page where you enter the news, this is the page that I NEED - here's what I got:

Code:
<html>

	<head>
		<title>News Form</title>
	</head>

	<body bgcolor="#ffffff"><center><h2>News Form</h2>
		<form action="/index.html" method="post" name="Date" width="500" height="500">
		<p>Date: <input type="text" name="date" size="30" maxlength="25"><br><i>Example:</i> Jan. 6, 2005</p>
		<p><div align="top">News: </div><textarea rows="10" cols="30">Put news here.</textarea></p>
		<p>Written by: <input type="text" name="date" size="20" maxlength="20"></p>
		<p><input type="submit" value="Submit"> <input type="reset" value="Clear"></p>
		</form>
		</center>
	</body>

</html>
I also don't know whether to use "get" or "post" here and I don't know how to make it send the info to the index.html. I'm assuming I have to write some new HTML in index.html where it knows where to put the news, correct?

For, the time being, I just want the login page to go to the add news page. Once I get it to work, I'm sure I can figure out how to add the add links page and other pages.

Any information or links to guides would be greatly appreciated...this HTML for Dummies book just isn't cutting it...

-thanks!

EDIT: talked to a friend on AIM....the login one would have to be in php, wouldnt it?
Last edited by mak; 01-06-2005 at 12:18 PM.
mak is offline  
Old 01-06-2005, 06:18 PM THREAD STARTER               #2 (permalink)
mak
NamePros Member
Join Date: Jan 2005
Location: Michigan
Posts: 36
mak is an unknown quantity at this point
 



Eh...nevermind. Found a really easy to use PHP script: http://bensscripts.andkon.com/site.php?id=2
__________________
What lies behind us and what lies before us are tiny matters compared to what lies within us.
-Ralph Waldo Emerson
mak is offline  
Old 01-07-2005, 05:50 PM   #3 (permalink)
.PJ
NamePros Regular
 
.PJ's Avatar
Join Date: Aug 2004
Posts: 363
.PJ is on a distinguished road
 



HTML on its can not make anything like login forms, post news, you need somthing like php and mysql.

PJ
__________________
L33TSig.net
.PJ is offline  
Old 01-07-2005, 07:38 PM THREAD STARTER               #4 (permalink)
mak
NamePros Member
Join Date: Jan 2005
Location: Michigan
Posts: 36
mak is an unknown quantity at this point
 



Yeah, ignorant me, soon found that out.
__________________
What lies behind us and what lies before us are tiny matters compared to what lies within us.
-Ralph Waldo Emerson
mak is offline  
Old 01-08-2005, 05:44 AM   #5 (permalink)
.PJ
NamePros Regular
 
.PJ's Avatar
Join Date: Aug 2004
Posts: 363
.PJ is on a distinguished road
 



Sorry, dude, if you want I can look for a tutorial, or make one for you!

PJ
__________________
L33TSig.net
.PJ is offline  
Old 01-08-2005, 07:29 PM THREAD STARTER               #6 (permalink)
mak
NamePros Member
Join Date: Jan 2005
Location: Michigan
Posts: 36
mak is an unknown quantity at this point
 



Nah, it's good. No worries. This script I found is really good.
__________________
What lies behind us and what lies before us are tiny matters compared to what lies within us.
-Ralph Waldo Emerson
mak is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 01:35 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger