Hi,
I want my users - who decide to complete a form - automatically be registered for Letterman. (J1.0.x)
I've tried this in the "Auto Generate"-tab:
But it doesn't seem to work...
Doesn anyone know how I can realize this?
I want my users - who decide to complete a form - automatically be registered for Letterman. (J1.0.x)
I've tried this in the "Auto Generate"-tab:
$sql1 = "INSERT INTO #__chronoforms_1 VALUES (
'' , '".$inum."','". date('Y-m-d')." - ".date("H:i:s")."', '".$_SERVER['REMOTE_ADDR']."' , '".mosGetParam($_POST,'email','')."' , '".mosGetParam($_POST,'name','')."' , '".mosGetParam($_POST,'tel','')."');";
$sql1 .= "INSERT INTO #__letterman_subscribers VALUES (
'' , '','', '".mosGetParam($_POST,'email','')."' ,'1', '')."');";
$database->setQuery( $sql1 );
But it doesn't seem to work...
Doesn anyone know how I can realize this?
Hi Quevi2008,
You look as though you are close. You'll need to complete the Chronoforms sql query before you start the Letterman one though.
Bob
You look as though you are close. You'll need to complete the Chronoforms sql query before you start the Letterman one though.
$sql1 = "INSERT INTO #__chronoforms_1 VALUES (
'' , '".$inum."','". date('Y-m-d')." - ".date("H:i:s")."', '".$_SERVER['REMOTE_ADDR']."' , '".mosGetParam($_POST,'email','')."' , '".mosGetParam($_POST,'name','')."' , '".mosGetParam($_POST,'tel','')."');";
$database->setQuery($sql1);
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>";
}
$sql2 = "INSERT INTO #__letterman_subscribers VALUES (
'' , '', '', '".mosGetParam($_POST,'email','')."' ,'1', '')."');";
$database->setQuery($sql2);
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>";
}
Bob
Funnily enough, this is exactly what I want to do.
Chronoforms makes great forms and Letterman does all I need from a newsletter.
Now, to try and learn a bit of coding.....
Chronoforms makes great forms and Letterman does all I need from a newsletter.
Now, to try and learn a bit of coding.....
This topic is locked and no more replies can be posted.