Page 1 of 1

Sending form data over an SSL

Posted: Tue Nov 25, 2003 8:40 pm
by seeker2921
What I want to do is send the form data over an ssl and that part is simple but the tricky part is that I need to have the from not in an ssl and then the form proccesor in the ssl then have the page indicating the data was sent not in ssl.. So first off, Is this going to create the same type of sercurity as just doing it all under an ssl? and also how do I do what I discribed?

Posted: Wed Nov 26, 2003 5:57 am
by Weirdan
1st page is the form, and it's not in ssl:

Code: Select all

<form action="https://yourdomain.com/form_validator.php" ... >
form_validator.php:

Code: Select all

if(!isset($_SERVER["HTTPS"]))
   die("Use HTTPS!");
 //...................
 // validate your form here
 //...................
 if($form_ok)
   header("Location: http://yourdomain.com/ok.php");
 else
   header("Location: http://yourdomain.com/fail.php");

Posted: Wed Nov 26, 2003 4:17 pm
by seeker2921
Awsome, Thats exactly what I wanted Thanks