I have a program I wrote in VB6 which records waves, converts them to MP3 and then uploads them them via FTP. (See a sample at
http://mp3-sermons.com/index.php?id=16). My website has a form on it where members can upload the MP3s created by my application:
<form enctype="multipart/form-data" action="[~[*id*]~]" method="post">
<p>
<input type="hidden" name="formid" value="[+fileupload.formid+]" />
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="[+fileupload.maxsize+]" />
<table>
<tr><td>Username:</td><td><input name="username" type="text" value="[+user.username+]" /></td></tr>
<tr><td>Password:</td><td><input name="password" type="password" /></td></tr>
<tr><td>MP3 Sermon file:</td><td><input name="userfile[]" type="file" /></td></tr>
<tr><td>Title:</td><td><input name="title" type="text" /></td></tr>
<tr><td>Date: </td><td><input onclick="ds_sh(this);" name="date" readonly="readonly" style="cursor: text" /></td></tr>
<tr><td>Passage:</td><td><input name="passage" type="text" /></td></tr>
<tr><td>Speaker:</td><td><input name="speaker" type="text" /></td></tr>
<tr><td>Comment:</td><td><textarea name="comments" rows = 10 cols = 20 </textarea></td></tr>
<tr><td> </td><td><input type="submit" value="Submit Sermon" /></td></tr>
</table>
Note: Only files with the following extensions will be accepted ([+fileupload.extensions+])
</p>
</form>
First, I could post to "index.php?id=8" but I don’t know that it won’t change in the future.
second, the form uses "[+fileupload.formid+]". I don’t know how I am going to have the program post to this page.
I could have a simple php form independent of modx, but then I couldn’t use the modx API like I do in the snippet.
Any ideas?