Skip to main content
Participating Frequently
September 17, 2019
Question

I NEED HELP

  • September 17, 2019
  • 1 reply
  • 507 views

I need to combine  form and query codes but I couldnt make it.

This is my CFML codes

<cfform name="ADDADA" method="post" >
<table border="3">
<tr>
<td><strong>Musteri ID: </strong></td>
<td><input type="text" name="MHid" >
</td></tr><br>
<tr>
<td><strong>Musteri Hareket Aciklama: </strong></td>
<td><input type="text" name="MHaciklama"> </td></tr>
<br>

<tr>
<td><strong>Musteri Tipi: </strong></td>
<td><input type= "text" name="Mtipi"></td>
</tr>
</table>
<br><input type="submit" name="Kaydet" value="KAYDET">
</cfform>
<cfif IsDefined("form.MHid") and IsDefined("from.MHaciklama")>

<cfquery NAME="ADD" datasource= "DENEME" >

INSERT INTO musterihareketleri (MusteriID,Aciklama,MusteriTipi)
values (
<cfqueryparam cfsqltype="cf_sql_integer" value="#cfform.MHid#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#cfform.MHaciklama#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#cfform.Mtipi#">
)
</cfquery>
</cfif>
<cfquery name="ADD" datasource="DENEME">
select * from musterihareketleri ;

</cfquery>
<cfdump var="#ADD#">

 

    This topic has been closed for replies.

    1 reply

    Charlie Arehart
    Community Expert
    Community Expert
    September 17, 2019

    While there are various curious coding practices in your code we might ask about, as for your "problem", could it be just the mistaken "from" for "form" in:

     

    IsDefined("from.MHaciklama")>

     

    If that's not it, please tell us the exact error or unexpected result you're getting. 

    /Charlie (troubleshooter, carehart. org)
    ressifeltAuthor
    Participating Frequently
    September 17, 2019
    thats the problem i dont get any error or unexpected reseult
    Charlie Arehart
    Community Expert
    Community Expert
    September 17, 2019
    Did you implement my suggested correction?
    /Charlie (troubleshooter, carehart. org)