I love this thing so far, unfortunately with my current structure I can't seem to get it to work in more then one place at a time.
.
Quick Outline of my script:
gb.asp
It takes care of reading and writing to a guestbook.
Structure of the form is (admittedly) sloppy
CASE
- Read: Outputs guestbook
- Write: Lets you input to the guestbook, needs RTE
- Exit: abandons session and returns to the homepage
- Default case: Outputs write page, but does not go through the initial validation
I have duplication of the form inside the script: case 2 and default. I can't seem to figure a way to get it to work correctly with the instructions given:
If I put:
Dim strFormName
Dim strTextAreaName
up top of the code, and just put:
strFormName = "form1"
strTextAreaName = "comment"
<!-- include the Web Wiz Rich Text Editor -->
<!--#include file="RTE_editor_inc.asp" -->
in-front of each of the two cases it bombs out...
If I dim it each time I get a redefinition error...
I've tried pulling the form out, making it an include with all the code inside it... failed as well
What am I missing? Or am I asking of it something it just isn't designed to do? Should I redesign?
Source is available upon request, but it is constantly in a state of flux at the moment.
***Ended up just going with re-writing my own code... It is homework, so we wrote it in several small portions and it caused some shortcuts I had taken to become too difficult to continue to band-aid. I'd still like to know the answer to the above question though.
If you care to see what I am writing:
UN: a
PW: a
And I had to lock the Dbase, so you can't write it. After we finished our last guest book we looked a bit into security and had to break into our own and classmates scripts. My script had a bunch of holes, and anyone with the source could sql inject a user name and enter some javascript to get in. Only the referential integrity prevented a post in the database from a user that does not exist.
Leads me to another question: Does this RTE protect against manual html tags? If not, what is to prevent someone from jumping into javascript in the middle of this?
Edited by Taco - 23 November 2006 at 7:32am