Sending form data over an SSL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
seeker2921
Forum Contributor
Posts: 120
Joined: Sat Mar 22, 2003 7:10 pm
Location: Wiesbaden Germany
Contact:

Sending form data over an SSL

Post 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?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post 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");
seeker2921
Forum Contributor
Posts: 120
Joined: Sat Mar 22, 2003 7:10 pm
Location: Wiesbaden Germany
Contact:

Post by seeker2921 »

Awsome, Thats exactly what I wanted Thanks
Post Reply