<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2><FONT size=1>
<P><FONT size=2>Hi,</FONT></P>
<P><FONT size=2>here is my problem:</FONT></P>
<P><FONT size=2>I've created a Registration form using webform in the create 
content section. It works fine. T</FONT><FONT size=2>he data which is entered 
through the registration form goes into the webform_submitted_data table. The 
registration form is designed for 2 different newsletters; newsletter1 &amp; 
newsletter2, The fields of the registration form is as Name, Address &amp; Email 
etc, what I want that to extract the Email id's from the table 
webform_submitted_data and insert it into sn_subscriptions table for 
subscription list of respected newsletters in the newsletter module instead of 
using the subscription form of the simplenews module. </FONT></P>
<P><FONT size=2>For that I wrote certain codes here:</FONT></P>
<P><FONT size=2>$mail1=db_fetch_object(db_query("select distinct data from 
{webform_submitted_data} where nid=250 and name='Email-ID'"));</FONT></P>
<P><FONT size=2>$result=count($mail1);</FONT></P>
<P><FONT size=2>for($i=1; $i&lt;=$result; $i++)</FONT></P>
<P><FONT size=2>{</FONT></P>
<P><FONT size=2>db_query("INSERT INTO {sn_subscriptions} (mail, uid, a_status) 
VALUES ('%s', %d, %d)", $mail1, $uid, 1);</FONT></P>
<P><FONT size=2>}</FONT></P>
<P><FONT size=2>The problem is that it does not insert the data into 
sn_subscriptions table.</FONT></P>
<P><FONT size=2>plz help me out.</FONT></P>
<P><FONT size=2>Regards!</FONT></P></FONT></FONT></DIV></BODY></HTML>