• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

HELP

Community Beginner ,
Sep 18, 2019 Sep 18, 2019

Copy link to clipboard

Copied

Hi 

I need help in this matter

The error which i get is this 

Element A is undefined in FORM.

cfusion/wwwroot/ADD_DENEME.cfm: line 42

 

 

<form name="add_deneme" method="post" >
<table border="3">
<tr>
<td><strong>Musteri ID: </strong></td>
<td><input type="text" name="a" id="a" required="yes" >
</td></tr><br>
<tr>
<td><strong>Musteri Hareket Aciklama: </strong></td>
<td><input type="text" name="b" id="b" required="yes"> </td></tr>
<br>

<tr>
<td><strong>Musteri Tipi: </strong></td>
<td><input type= "text" name="c" id="c" required="yes"></td>
</tr>
</table>
<br><input type="submit" name="Kaydet" value="KAYDET">
</form>

<cfif IsDefined("form.a")>
<cfquery datasource= "DENEME" >

INSERT INTO MusteriHareketleri (MusteriId,Aciklama,musteriTipi)
values (
<cfqueryparam cfsqltype="cf_sql_integer" value="#form.a#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.b#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.c#">
)
</cfquery>
<cflocation url="http://127.0.0.1:8500/ADD_DENEME.cfm" addtoken="false">
</cfif>
<cfquery name="ADD" datasource="DENEME">
select * from MusteriHareketleri ;
</cfquery>
<cfquery name="update" datasource="DENEME">
UPDATE MusteriHareketleri
SET
MusteriId,
Aciklama="#form.b#",
musteriTipi="#form.c#"
WHERE
MusteriId="#form.a#"
</cfquery>
<cfdump var="#add#">

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Sep 18, 2019 Sep 18, 2019

Your update statement at the bottom references form.a when it doesnt exists (before the page is posted). You need to move this up inide the CFIF where you check if form.a is defined.

Votes

Translate

Translate
Advocate ,
Sep 18, 2019 Sep 18, 2019

Copy link to clipboard

Copied

LATEST

Your update statement at the bottom references form.a when it doesnt exists (before the page is posted). You need to move this up inide the CFIF where you check if form.a is defined.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation