Solved

Could u pls tell me the right syntex?

Posted on 2000-02-17
3
136 Views
Last Modified: 2013-12-24
I have a form with some fields. Now I want to store all the fields data to be store in a single variable. What I have done is patesd below:

<!-- Form.html -->

<form name="data" action="FormAction.cfm" method="Post">
      Name : <input type="Text" name="Name"> <br>
      Phone : <input type="Text" name="PhoneNo"> <br>
      <input type="Submit" name="Submit"> <br>
</form>

<!-- FormAction.cfm -->

<cfoutput>
      <cfset Data=
      <cfif isDefined("Form.Name")>"#Name# </cfif>
      <cfif isDefined("Form.PhoneNo")>#PhoneNo# </cfif> >
</cfoutput>

<cfoutput>
      #Data#
</cfoutput>

I am getting following error:
~~~~~~~~~
Error Occurred While Processing Request
Error Diagnostic Information
Just in time compilation error

Invalid token found on line 5 at position 2. Cold Fusion was looking at the following text:

<c
The last successfully parsed CFML construct was a CFSET tag occupying document position (4:2) to (4:7).

The specific sequence of files included or processed is:
C:\WEBSHARE\WWWROOT\training\FormAction.cfm      


Date/Time: 02/18/00 11:24:59
Browser: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
Remote Address: 127.0.0.1
HTTP Referer: http://127.0.0.1/training/temp.htm
Template: C:\WEBSHARE\WWWROOT\training\FormAction.cfm
~~~~~~~

Can anybody help me out of this problem?

RAjesh

0
Comment
Question by:rkchopra
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
FRehman earned 100 total points
ID: 2534310
<cfoutput>
<cfset Data=
<cfif isDefined("Form.Name")>'#form.Name#' </cfif>
<cfif isDefined("Form.PhoneNo")>#PhoneNo# </cfif> > 
</cfoutput>
check this you put extra " after fist if condition
0
 
LVL 4

Expert Comment

by:FRehman
ID: 2534345
try this I check it it work fine
<cfoutput>
<cfset data="">
<cfif isDefined("Form.Name")>
<cfset data=listappend(data,"dsfsd")>
 </cfif>
 <cfif isDefined("Form.Phone")>
 <cfset data=listappend(data,'#form.phone#')>
 </cfif>
</cfoutput>
<cfoutput>#data#</cfoutput>
0
 

Author Comment

by:rkchopra
ID: 2534608
The second once works fine. Thankyou very much. I am giving you 100 no.

Regards,
RAjesh
0

Featured Post

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question