Re: passing multiple variables in a url

From: Date: Thu, 14 Nov 2002 15:29:57 +0000
Subject: Re: passing multiple variables in a url
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-124438@lists.php.net to get a copy of this message
that works fine thanks. Now for what to do with the variables (new post "scanning for non alpha characters") "Bigdog" <bigdog@venticon.com> wrote in message news:1037262239.10847.17.camel@pclnxrhunter.digitalglobe.com... > Does this not work... > > <a href=contactus.php?email=director&subject=job enquiry> > > > > On Thu, 2002-11-14 at 14:11, CJ wrote: > > I have a "contact us" php script on my site that allows users to email > > direct from the webiste. I want to be able to pass the to address and > > subject line to the script so I can call teh web page from elsewhere on the > > site and have it automatically choose the correct email address and subject > > line. > > > > EG instad of using <a > > href=mailto:joe@bloggs.mail.com> which requires them > > to have an email client set up on the machine I want to link to > > <a href=contactus.php?email=director subject=job enquiry> > > The script already handles the email=director by setting a default entry in > > a drop down form but I can't get it to separate the first and second > > variables in the URL. > > > > Also is this a big security risk as I will be echoing the 2nd variable as > > the contents of a form field. Would it be possible for someone to type in > > the URL with HTML/php in it that would make a mess of everything? How can I > > protect against this? Would it be sufficient to just pase the 2nd variable > > for non alphabetic characters and remove them? > -- > .: B i g D o g :. > >

« previous php.general (#124438) next »