Skip to main content
Participating Frequently
Sep 17, 2019 10:18 AM UTC
Question

I NEED HELP

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 is closed to new replies. Start a new post to keep the conversation going.

    7 replies

    Charlie Arehart
    Community Expert
    Community Expert
    Sep 17, 2019 12:10 PM UTC

    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. 

    Translate
    /Charlie (troubleshooter, carehart. org)
    ressifeltAuthor
    Participating Frequently
    Sep 17, 2019 12:13 PM UTC
    thats the problem i dont get any error or unexpected reseult
    Translate
    Charlie Arehart
    Community Expert
    Community Expert
    Sep 17, 2019 12:14 PM UTC
    Did you implement my suggested correction?
    Translate
    /Charlie (troubleshooter, carehart. org)