Building an On-Rev Guest Book

Sarah Reichelt sarah.reichelt at gmail.com
Thu Aug 27 18:29:59 EDT 2009


Instead of posting the form data to a separate file, post it back to  
the file containing the form itself and have it read the post data,  
save it and then display it all in the one file.

So put the script you have in form.irev into an HTML snippet on the  
original page. Then change the form action to point to whatever you  
have called that file.

For some On-Rev examples, check out my page at http://www.troz.net/onrev/ 
  especially the Simple Form script.

Cheers,
Sarah


Sent from my iPhone

On 28/08/2009, at 7:23 AM, Gregory Lypny <gregory.lypny at videotron.ca>  
wrote:

> Hello everyone,
>
> Well, I've made some progress with this whole On-Rev thing.  I'm  
> trying to reproduce Kevin Miller's video example of guest book form  
> that echoes the entry and save it to a file except that I want to do  
> it using an HTML snippet object in an iWeb page that I've got served  
> from my Mac in the Sites folder.  I think the HTML snippet works  
> like an iFrame but I'm not sure if they are the same thing.  Man,  
> that was a mouthful and probably a pain to read, but it's just the  
> three parts listed below.
>
> Everything works fine except that the entry is echoed in a new  
> (blank) window rather than tacked onto the original form page as in  
> Kevin's example.  Can anyone tell me how I can get the entry to echo  
> in the original form?
>
> Much obliged,
>
>    Gregory
>
> 1.  An iWeb site served from my Mac's Sites folder
>
> 2.  One of the pages has the following HTML snippet:
>
> <form action="http://myAccount.on-rev.com/form.irev"  method="post">
>    -- Kevin's web form HTML code copied here
> </form>
>
> 3.  The form.irev file referred to in the snippet in 2 above has the  
> following code that processes the form.
>
> <html>
>
> <?rev
> put $_POST["name"] into theName
> put $_POST["age"] into theAge
> put $_POST["email"] into theEmail
>
> if theName is not empty
> then
>
> put theName & tab & theAge & tab & theEmail & return \
> after url ("file:testGuestBook.txt")
>
> put "YOUR REGISTRATION" & "</br>"
> put "Name:" && theName & "</br>"
> put "Age:" && theAge & "</br>"
> put "eMail:" && theEmail & "</br>"
> put  "</br>" & "</br>"
> put "OTHER REGISTRANTS" & "</br>"
> put url ("file:testLogin.txt")
> else
> put "NO NAME!"
> end if
>
> ?>
>
> </html>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list