<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I think you need a *_schema() definition to use drupal_write_record<br>
    I'd try db_insert("new_admin")-&gt;...<br>
    <br>
    Bye<br>
    <br>
    Il 29/02/2012 10:39, Kokou Afidegnon ha scritto:
    <blockquote
cite="mid:CAGcmBVXLtr5tXkYLZ0vF1pJD4_vJT=HbF0mLBsMLP+4R9atr+Q@mail.gmail.com"
      type="cite">
      <div>Hi, Good morning,&nbsp;</div>
      <div><br>
      </div>
      <div>I am tryingto apply a conditional action on my drupal, page.
        by applying this conditional action with the following custom
        php to add an entry to the database, but unfortunately, no entry
        is being submitted. and there is no returning error too. can you
        please assist?&nbsp;</div>
      <div><br>
      </div>
      <div>here is the custom php I have added.&nbsp;</div>
      <div><br>
      </div>
      <div>$result = db_query_range('SELECT*FROM users AS u LEFT JOIN
        profile_values AS pv ON u.uid = pv.uid WHERE u.uid = %d',
        $order-&gt;uid, 0, 10);</div>
      <div><span class="Apple-tab-span" style="white-space:pre"> </span>&nbsp;</div>
      <div>&nbsp; while ($res = db_fetch_object($result)) {</div>
      <div>$data = array(</div>
      <div>'id' =&gt; '',</div>
      <div>'reqadm_login' =&gt; $res-&gt;name,</div>
      <div>'reqadm_pass' =&gt; $res-&gt;pass,</div>
      <div>'domain_name' =&gt; $res-&gt;value,</div>
      <div>'family_name' =&gt; $order-&gt;billing_first_name,</div>
      <div>'first_name' =&gt; $order-&gt;billing_last_name,</div>
      <div>'comp_name' =&gt; $order-&gt;billing_company,</div>
      <div>'iscomp' =&gt; 'yes',</div>
      <div>'email' =&gt; $order-&gt;primary_email,</div>
      <div>'phone' =&gt; $order-&gt;billing_phone,</div>
      <div>'addr1' =&gt; $order-&gt;billing_street1,</div>
      <div>'addr2' =&gt; $order-&gt;billing_street2,</div>
      <div>'zipcode' =&gt; $order-&gt;billing_postal_code,</div>
      <div>'city' =&gt; $order-&gt;billing_city,</div>
      <div>'country' =&gt; $order-&gt;billing_country,</div>
      <div>'paiement_id' =&gt; $order-&gt;order_id,</div>
      <div>'product_id' =&gt; $order-&gt;,</div>
      <div>'shopper_ip' =&gt; $order-&gt;host,</div>
      <div>'date' =&gt; $nowdate,</div>
      <div>'time' =&gt; $nowtime,</div>
      <div>'add_service' =&gt; 'yes'</div>
      <div>&nbsp; );</div>
      <div>&nbsp; drupal_write_record('new_admin', $data);</div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
  </body>
</html>