home *** CD-ROM | disk | FTP | other *** search
/ Cool Page Magazine 16 / CoolPage_16.iso / dynadb / codes / addcust2.cfm < prev    next >
Text File  |  1998-01-22  |  2KB  |  43 lines

  1. <!---------------------------└╔ªWíGAddtype2.cfm-------------------->
  2. <!---            │o¼Oñ@¡╙½ß│B▓z╡{ªí            --->
  3. <!---        Ñ╗¡╢¼Oªb┐ΘñJ╝╞¡╚ÑH½ß│B▓z¬║╣L╡{            --->        
  4. <!---        ½e¡▒ñjÑb│í│ú¼Oªb┤·╕╒⌐╥┐ΘñJ¬║╕Ω«╞¼Oº_Ñ┐╜T    --->
  5. <!----------------------------------------------------------------->
  6.  
  7. <HTML>
  8. <BODY background="paper12l.jpg">
  9.  
  10.     <!--- ▒N┼▄╝╞▒╥⌐lñ╞  --->    <!------------------------------------------------->
  11.     <cfset dupidx=false>        <!--- ¿M⌐w┼U½╚╜s╕╣ª│¿Sª│¡½┬╨¬║┼▄╝╞        --->
  12.                     <!------------------------------------------------->
  13.  
  14.     <!--- └╦¼d║╪├■¬║╜s╕╣⌐MªW║┘ª│¿Sª│¡½╜╞ --->
  15.     <CFQUERY NAME="Checkcust" DATASOURCE="Dynamic Database">    
  16.         select * from customer where 
  17.             cust_id = '#cust_id#' 
  18.     </CFQUERY>
  19.  
  20.     <cfif #Checkcust.recordcount# greater than 0>
  21.         <cfset dupidx=true>            
  22.             ║╪├■╜s╕╣⌐╬ªW║┘¡½╜╞<br>
  23.     <cfelse>
  24.         <!--------------------------------------------------------------------->
  25.         <!---    ªp¬G│q╣LñF⌐╥ª│¬║┤·╕╒íA┤N╖|¿╙¿∞│oñ@│íñ└                      --->
  26.             <!---   │o¼Oñ@Ñy╖s╝W░O┐²¬║╗yÑyíA─µª∞ªW║┘Ñ▓╢╖⌐M╝╞╛┌«w¬║─µª∞ªW║┘ñ@¡P  --->
  27.         <!--------------------------------------------------------------------->
  28.         
  29.         <CfQuery name="AddRecord" datasource="dynamic database">
  30.             insert into customer(cust_id, hkid, family_name, given_name, 
  31.                         address, tel, fax, email, visa)
  32.             values ('#cust_id#', '#hkid#', '#family_name#', '#given_name#',
  33.                 '#address#', '#tel#', '#fax#', '#email#', '#visa#')
  34.         </cfquery>
  35.  
  36.         <HEAD><TITLE>╕Ω«╞ñw╕g╖s╝W</TITLE></HEAD>
  37.         <CENTER><H2>ºA¡Φñ~⌐╥┐ΘñJ¬║║╪├■╕Ω«╞ñw╖s╝Wª▄╝╞╛┌«wññ</H2></CENTER>
  38.         <HR>
  39.         <P ALIGN="center"><A HREF="/dynadb/index.htm">ª^¿∞ÑD¡╢</A></P>
  40.         </BODY>
  41.         </HTML>    
  42.     </cfif>
  43.