Help is appreciated here.....

Results 1 to 6 of 6

Thread: Help is appreciated here.....

  1. #1
    T.S Guest

    Default Help is appreciated here.....

    Hi there!<BR><BR>Nice board!! :)<BR><BR>I need help with a thing here. I have a "mail a friend" function(I&#039;m using JMail) on my site. Let&#039;s say I split it up on two pages. <BR><BR>index.asp(The page that handles the form):<BR><BR>&#060;form method="post" action="index2.asp"&#062;<BR>Your Name: <BR>&#060;input type=text name=email class="text" size="15"&#062;<BR><BR><BR>Friend&#039;s e-mail: <BR>&#060;input type="text" name="recipient" class="text" size="15"&#062;<BR>br&#062;<BR>&#060;input type="hidden" name="subject"&#062;<BR>&#060;input type="hidden" name="body" value=""&#062;<BR>&#060;input type="Submit" value="send" class="button"&#062;<BR>&#060;/form&#062; <BR><BR><BR><BR>index2.asp(Handles the mailing):<BR><BR><BR> &#060;%<BR><BR> Name = "Toni"<BR> SenderEmail = Request.Form("email")<BR> Subject = "Regarding " & Request.Form("subject")<BR> Recipient = Request.Form("recipient")<BR> Body = "Hello!!!"<BR><BR>If instr(1,SenderEmail,"@") = 0 Then<BR> SenderEmail = Recipient <BR>End If<BR><BR> set msg = Server.CreateOBject( "JMail.Message" )<BR> on error resume next<BR><BR> msg.Logging = true<BR> msg.silent = true<BR><BR> msg.FromName = Name<BR> msg.From = SenderEmail<BR> msg.Subject = Subject<BR> msg.AddRecipient Recipient<BR> msg.Body = Body<BR><BR> if not msg.Send("") then Response.write "&#060;pre&#062;" & msg.log & "&#060;/pre&#062;"<BR> msg.Close<BR> set msg = Nothing <BR> %&#062;<BR>Thankx for spreading the word!!<BR><BR><BR><BR>Ok, so everything works fine! But there is a slight problem. I want people to only be able to send mail ONCE! In other words, when they revisit the site after a while, I want the "index2.asp" file to show up, and not the "index.asp".... How do I do this??<BR><BR>Help is REALLY appreciated!!<BR><BR>Cheers!

  2. #2
    Kentium Guest

    Default cookies are tasty!

    R&D cookies.

  3. #3
    Join Date
    Dec 1969

    Default Set a cookie value

    set the faqs on cookies to true when they send an e-mail and if true redirect them to index2.asp. However will not have e-mail inf0 need to use a db to save that and recall based on a mail id or something.

  4. #4
    T.S Guest

    Default RE: Set a cookie value

    Help! How do I do this?? I&#039;m not so advanced... :)

  5. #5
    Join Date
    Dec 1969

    Default Like I said check the faqs

    here&#039;s the one for cookies<BR><BR>

  6. #6
    FAQ Guest

    Default RE: Like I said check the faqs

    Why dont you check the FAQs and get your **** FAQs right

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts