cancel
Showing results for 
Search instead for 
Did you mean: 

secure web form with php??

ecuon
Newbie
Posts: 3
Registered: ‎22-12-2008

secure web form with php??

Hi
I have been trying to follow the advice on the plusnet help page to create a secure https web form but I can't get it to work. The help page is :
http://www.plus.net/support/webspace/cgi_php/cgi_scripts.shtml
-===========================
which says:
Make it secure
If you wish to use a secure form to collect sensitive information, you can do so using https:// instead of http:// both in the code for the form and to reference the page containing the form; i.e. use
< a href="https://homepages.plus.net/username/form.html" to link to the page and form method="post" action="https://homepages.plus.net/cgi-bin/form" in the form page source. The homepages.plus.net/username version of your web address must be used.
============================
I can get the page to come up when I put a conventional html webform at the root of my site
https://homepages.plus.net/myusername/form.htm
in the address bar but the problem is that I want to do some php processing on my webform so have to put it in the cgi-bin.
When I try to direct to a php script in the cgi-bin I cannot bring up the page.
Is there anyway to have a secure form that uses php within the Plusnet setup?
Many thanks for your advice.
Leon
2 REPLIES
ecuon
Newbie
Posts: 3
Registered: ‎22-12-2008

Re: secure web form with php??

Let me try to explain my problem a little more clearly...
I have a form that populates a drop down list from a database table in Mysql using php. The form therefore has a .php extention and as it is serverside processing the form has to go in the cgi-bin. However within the cgi-bin it doesn't appear to be possible to open a secure https form.  Can anyone suggest if I am wrong in my conclusions and if not is there any work around?  The only thing that comes to mind is to split the form so that the sensitive info is in a secure form and the server processing is done in a separate form in the cgi-bin....
ecuon
Newbie
Posts: 3
Registered: ‎22-12-2008

Re: secure web form with php??

OK I've worked it out but here is the answer in case anyone has the same problem.  You can't use a secure webform on CGI webspace as suspected.
My solution is to do the Serverside processing of data to populate the dropdown menu before going to the secure webform.  The data for the form is passed via the php script as a query string.  Javascript is then used to process the string and populate the dropdown menu on the secure form.  All that is required is this intermediary step (the php script) between the link and form. Smiley