Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Request QueryString Problem??

Request QueryString Problem??

Scheduled Pinned Locked Moved Web Development
helpcomsysadmintoolsquestion
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mjay2004
    wrote on last edited by
    #1

    Hi, i'm trying to attach my querystring to some email script so that it attachs the image and emails it. My querystring would be /send.asp?name=images/logo.jpg and heres my script <%@ Language=VBScript %> <% Dim name name=Request.QueryString("name") %><% If Len(Request.Form("txtEmail")) > 0 then Dim objMail Set objMail = Server.CreateObject("CDONTS.NewMail") objMail.From = "info@4guysfromrolla.com (4GuysFromRolla.com)" objMail.Subject = "Email attachment demo" objMail.AttachFile Server.MapPath ("name") objMail.To = Request.Form("txtEmail") objMail.Body = "This is a demo on sending an email with an attachment." objMail.Send Response.write("Mail was Sent") 'You should always do this with CDONTS. set objMail = nothing End If %> **Enter your email address:** "> Any help would be great thanks

    S 1 Reply Last reply
    0
    • M mjay2004

      Hi, i'm trying to attach my querystring to some email script so that it attachs the image and emails it. My querystring would be /send.asp?name=images/logo.jpg and heres my script <%@ Language=VBScript %> <% Dim name name=Request.QueryString("name") %><% If Len(Request.Form("txtEmail")) > 0 then Dim objMail Set objMail = Server.CreateObject("CDONTS.NewMail") objMail.From = "info@4guysfromrolla.com (4GuysFromRolla.com)" objMail.Subject = "Email attachment demo" objMail.AttachFile Server.MapPath ("name") objMail.To = Request.Form("txtEmail") objMail.Body = "This is a demo on sending an email with an attachment." objMail.Send Response.write("Mail was Sent") 'You should always do this with CDONTS. set objMail = nothing End If %> **Enter your email address:** "> Any help would be great thanks

      S Offline
      S Offline
      satya chhikara
      wrote on last edited by
      #2

      You should first encode the name because http always convert special symbol like it convert blank space into + sign and also more . First use server.encode(name) then pass it as query string then in the next page first use name = server.decode(name) If it not work then make own symbol like + to replace blank from querystring and another symbol from the query string and then in the next page replace these symbol again .

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups