'Submit' button in HTML

'Submit' button in HTML

Post by RabbitH0le on Wed Sep 29, 2010 5:14 pm
([msg=46786]see 'Submit' button in HTML[/msg])

Quick question. I'm tinkering around with HTML forms on my test website. I'm trying to make a virtual guest book that includes Name and E-mail inputs and has a Submit button to submit the data. I don't quite understand where this data goes after it is submitted, and how I am supposed to retrieve it. Can I get it to flow to a text file of some sort?

Here is the code I have now:

<form name="input" action="" method="get">
Username: <input type="text" name="user" />
E-mail: <input type="text" name="email" />
<input type="submit" value="Submit" />
</form>
live together or die alone.
RabbitH0le
Experienced User
Experienced User
 
Posts: 61
Joined: Tue Aug 24, 2010 2:07 pm
Blog: View Blog (0)


Re: 'Submit' button in HTML

Post by Goatboy on Wed Sep 29, 2010 5:18 pm
([msg=46787]see Re: 'Submit' button in HTML[/msg])

You can't make a guestbook entirely in HTML. Like you said, there needs to be something to handle the input. This "something" is probably wither ASP or PHP. Perl, Python, and just about any other language can handle it, but ASP and PHP are the two most commonly associated with server-side web code.
Assume that everything I say is or could be a lie.
1UHQ15HqBRZFykqx7mKHpYroxanLjJcUk
User avatar
Goatboy
Expert
Expert
 
Posts: 2822
Joined: Mon Jul 07, 2008 9:35 pm
Blog: View Blog (0)


Re: 'Submit' button in HTML

Post by RabbitH0le on Wed Sep 29, 2010 5:20 pm
([msg=46788]see Re: 'Submit' button in HTML[/msg])

Thanks Goatboy. I thought there was something I was missing. Looks like I just added PHP to my TO DO list.
live together or die alone.
RabbitH0le
Experienced User
Experienced User
 
Posts: 61
Joined: Tue Aug 24, 2010 2:07 pm
Blog: View Blog (0)


Re: 'Submit' button in HTML

Post by sanddbox on Wed Sep 29, 2010 7:43 pm
([msg=46794]see Re: 'Submit' button in HTML[/msg])

Remember, HTML is client side - it won't have any impact on your server.
Image

HTS User Composition:
95% Male
4.98% Female
.01% Monica
.01% Goat
User avatar
sanddbox
Expert
Expert
 
Posts: 2331
Joined: Sat Jul 04, 2009 5:20 pm
Blog: View Blog (0)


Re: 'Submit' button in HTML

Post by Defience on Wed Sep 29, 2010 8:27 pm
([msg=46803]see Re: 'Submit' button in HTML[/msg])

You might want to check out MySQL as well for storing information in a database: php mysql guestbook
User avatar
Defience
Addict
Addict
 
Posts: 1281
Joined: Thu Jun 12, 2008 3:16 pm
Blog: View Blog (0)


Re: 'Submit' button in HTML

Post by fabianhjr on Thu Sep 30, 2010 6:25 pm
([msg=46854]see Re: 'Submit' button in HTML[/msg])

Just watch out for XSS vulnerabilities!
http://www.owasp.org/index.php/XSS
Donate bitcoins to me! [1DhRP3hHgmSLQdRTZyT8VPTmzAj7Z2rsGA]
Dunno what bitcoins are? BitcoinMe
fabianhjr
Poster
Poster
 
Posts: 286
Joined: Tue Sep 21, 2010 7:48 pm
Blog: View Blog (0)


Re: 'Submit' button in HTML

Post by mRmasteRful on Thu Sep 30, 2010 7:56 pm
([msg=46861]see Re: 'Submit' button in HTML[/msg])

Rabbit I was doing html forms today to and realized it was useless... Im on php now looks like im ahead in the race :)
mRmasteRful
Poster
Poster
 
Posts: 274
Joined: Fri Apr 02, 2010 11:53 pm
Blog: View Blog (0)


Re: 'Submit' button in HTML

Post by sanddbox on Thu Sep 30, 2010 8:31 pm
([msg=46864]see Re: 'Submit' button in HTML[/msg])

mRmasteRful wrote:Rabbit I was doing html forms today to and realized it was useless... Im on php now looks like im ahead in the race :)


You still need HTML with PHP...

Also, forms are definitely not useless.
Image

HTS User Composition:
95% Male
4.98% Female
.01% Monica
.01% Goat
User avatar
sanddbox
Expert
Expert
 
Posts: 2331
Joined: Sat Jul 04, 2009 5:20 pm
Blog: View Blog (0)


Re: 'Submit' button in HTML

Post by mRmasteRful on Thu Sep 30, 2010 10:13 pm
([msg=46872]see Re: 'Submit' button in HTML[/msg])

Yes Sanddy I know but Im done html tutorials well to a degree. Im sure they are useful but they did not cover how the data is saved to a form and how to display saved data on an html doc so there is no point in using it for now. Im hoping php covers that however.
mRmasteRful
Poster
Poster
 
Posts: 274
Joined: Fri Apr 02, 2010 11:53 pm
Blog: View Blog (0)


Re: 'Submit' button in HTML

Post by sanddbox on Thu Sep 30, 2010 11:38 pm
([msg=46881]see Re: 'Submit' button in HTML[/msg])

mRmasteRful wrote:Yes Sanddy I know but Im done html tutorials well to a degree. Im sure they are useful but they did not cover how the data is saved to a form and how to display saved data on an html doc so there is no point in using it for now. Im hoping php covers that however.


Yes, but you still need the forms for the data to be submitted in the first place...PHP handles the server side, not client side.

Anyway, getting data from POST and GET variables is quite easy. Do some googling; I'm sure you'll find more than enough information.
Image

HTS User Composition:
95% Male
4.98% Female
.01% Monica
.01% Goat
User avatar
sanddbox
Expert
Expert
 
Posts: 2331
Joined: Sat Jul 04, 2009 5:20 pm
Blog: View Blog (0)


Next

Return to Web Design

Who is online

Users browsing this forum: No registered users and 0 guests