Hi Seba
I have managed to do something like what you are asking, using a bit
of server-side php code. For example, in one TW, when a user enters
data for a new reference (using a html form).....on hitting the submit
botton, the information from the form is used 1/ to create and open a
new wiki, 2/ add that reference into a database (MySQL) and /3 sends
me am email notifying me of what just happened. Note that this TW is
not server-side...rather it sits in a shared Dropbox folder!
OK....the nitty gritty of the system is based on modifying Erics great
little Contact form -
http://www.tiddlytools.com/#Contact
A very simple example, where a new tiddler, mysql entry and email is
generated as a result of a simple form - the tiddler has this code
---
<html><nowiki><form method=GET action="
http://www.mydomain/
mailtext_tags.php" target=responseframe>
<input name="etiqueta" style="width:160px;" value="etiqueta"
onfocus="this.select()"><br>
<input type=hidden name="to" value ="skye@mydomain">
<input type=hidden name="assunto" value ="New Tag">
<input type=hidden name="script"
value="<script>config.options.txtTags=tiddler.title;refreshDisplay();</
script>">
<input type=hidden name="who">
<input type=hidden name="when">
<input name="linkedfrom" style="width:160px;" value="sub-etiqueta to"
onfocus="this.select()"><br>
<textarea name="text" rows="4" cols="44" onfocus="this.select()"></
textarea><br>
<input type="submit" value="Criar-la" onclick='
var etiqueta=this.form.etiqueta.value;
var who=config.options.txtUserName;
this.form.who.value=who;
var when=new Date();
this.form.when.value=when;
this.form.text.value=this.form.text.value+"\n"+this.form.script.value;
var tag="Etiquetas"+" "+this.form.linkedfrom.value;
var fields={};
store.saveTiddler(etiqueta,etiqueta,this.form.text.value,who,when,tag,fields);
autoSaveChanges();
'></form>
</html>
and the php file on the server is -
<?php
// inputs: $to, $assunto, $etiqueta, $text, $linkedfrom
// computed: $id, $sys
$errmsg = '';
$sys = $_SERVER['SERVER_NAME']; $sys=str_replace("www.","",$sys);
$id = $_SERVER['REMOTE_ADDR']; if ($_SERVER['REMOTE_HOST']!='')
$id.=' '.$_SERVER['REMOTE_HOST'];
$to = $_REQUEST['to'];
$assunto = $_REQUEST['assunto'];
$etiqueta = $_REQUEST['etiqueta'];
$text = $_REQUEST['text'];
$linkedfromu = $_REQUEST['linkedfrom'];
$who = $_REQUEST['who'];
$when= $_REQUEST['when'];
if ($to=='')
{ $errmsg = "A destination address is required.<br>"; }
else if (!stristr($to,$sys))
{ $errmsg = "Invalid destination: ".$to."<br>Domain must be: ".
$sys."<br>"; }
// connect to references data base
$username="name";
$password="password";
$database="database";
//put data into database
$con = mysql_connect("localhost","name","password");
if (!$con){die ('could not connect:' . mysql_error());}
mysql_select_db("database_Courses",$con);
mysql_query("INSERT INTO table VALUES
('$etiqueta','$text','$linkedfrom','$when')");
mysql_close($con);
?>
<?php
$message=$etiqueta;
mail($to,$assunto,$message,$who);
?>
Hope that helps
Hugs
Skye