Cold Fusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingCold Fusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 16th, 2002, 08:48 AM
ctredway ctredway is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Garland Tx
Posts: 39 ctredway User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via ICQ to ctredway Send a message via AIM to ctredway Send a message via Yahoo to ctredway
ColdFusion Teaser

I just thought that I would show how to get form variables when a form is submitted in ColdFusion.

Here is a very simple form and the outputing of the form fields.

<html>
<head>
<title>CF Teaser</title>
</head>
<cfparam name="form.fname" default="">
<cfparam name="form.lname" default="">
<body>

<form action="<cfoutput>#cgi.script_name#</cfoutput>" method="post">
First Name:<input type="text" name="fname" size="25" maxlength="30"><br>
Last Name:<input type="text" name="lname" size="25" maxlength="30"><br>
<input type="submit" name="go" value=" Say Hello ">

</form>

<cfif isDefined('form.go')>
Hello <cfoutput>#form.fname# #form.lname#</cfoutput>!
</cfif>

</body>
</html>

You can copy and paste this code into a coldfusion page and not have to change any of the code for it to work.

If you want to talk about this code, just ask me
__________________
Clint Tredway
Need a website?
Need development help?
www.fishermenstudios.com
ctredway@fishermenstudios.com

Reply With Quote
  #2  
Old August 16th, 2002, 08:51 AM
ctredway ctredway is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Garland Tx
Posts: 39 ctredway User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via ICQ to ctredway Send a message via AIM to ctredway Send a message via Yahoo to ctredway
I forgot one tiny detail that some people may not know...

If you use the code that I showed in the previous post, you must save the file with a .cfm extention. If you do not, the ColdFusion will not render it and therefore it will bu useless.

HTH,

Reply With Quote
  #3  
Old August 16th, 2002, 09:20 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Clint, is there a way in coldfusion to change the extensions. so it parse say cfm, html html etc...??

Reply With Quote
  #4  
Old August 16th, 2002, 10:52 PM
ctredway ctredway is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Garland Tx
Posts: 39 ctredway User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via ICQ to ctredway Send a message via AIM to ctredway Send a message via Yahoo to ctredway
That depends on the web server you are using. I know how to change IIS to make ColdFusion parse any extention that you want, but I do not know about Apache as I have limited experience with Apache.

Reply With Quote
  #5  
Old October 11th, 2002, 11:23 AM
Dai Dai is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: UK
Posts: 3 Dai User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Just as easy in Apache, it is a function of the web server, not of Cold Fusion per se, the web server has a 'map' of extensions and what it should do with them (send them straight to the client, call a program to handle them, ignore them etc.). Using .cfm for cold fusion, .php for php, .htm for html etc. is just convention, not necessity.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingCold Fusion Development > ColdFusion Teaser


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap