Solved

Could u pls tell me the right syntex?

Posted on 2000-02-17
3
133 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

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 …
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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