You are here: Re: form posted fields disappear when posting from secure to a non-secure page « HTML « IT news, forums, messages
Re: form posted fields disappear when posting from secure to a non-secure page

Posted by Adrienne Boswell on 01/10/07 03:25

Gazing into my crystal ball I observed wolfing1@gmail.com writing in
news:1168268056.169052.80730@i15g2000cwa.googlegroups.com:

>> > If I enter from a secure page, the field is blank. If I enter from
a
>> > nonsecure page, the field has the value entered.
>> >
>> >
>>
>> What is the value of the action attribute of the form element? You
need
>> to specify https there as well, eg:
>>
>> <form method="post" action="https://www.example.com/form.asp">
>>
> But the page I'm posting to is not secure.
> Basically, the field and form are part of a page header which all my
> pages share with a 'search' field. So, when someone enters a word here
> and presses the 'go' button, the value is (or should be) posted to the
> 'search_results' page which does the searching and shows the results.
> So, the callling page could be secure or not, and the action for the
> form would be 'http:' since the "search results" page is not secure.
> But what I found is that, when I do it from a non-secure page the
field
> goes fine, but when I do it from a secure page, the field goes blank.
>
>

Then you have to determine whether or not you are on a secure page.

<% if request.servervariables("HTTPS") = "off" then
serverswitch = "HTTPS"
else
serverswitch = "HTTP"
end if

formaction = serverswith & request.servervariables("script_name")
if request.servervariables("querystring") <> "" then
formaction = formaction & "?" & request.servervariables
("quertystring")
else
formaction = formaction
end if
%>

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация