Well, I'm no php-guru, that's for sure, but if you are trying to call: https://www.tgwedding.com/payment6.php from http://www.tgwedding.com/payment6.php
might be where the problem lies. You might need to do a 'refresh' since "What is strange is when I go back on my browser and resubmit, it correctly sends it to the https location and all is well." What I have done a s a clutz-hack is to create an additional page for the re-direct, which then sends it back to the page in question. (I used that for 'cookie' detection/browser ident as well on my opening pages.) I suppose you might get away with a Meta Refresh but I'm not too clear whetehr you can accomplish that for the same page . . Aside from that idea . . . . Hth, Andre On Thursday 17 June 2004 08:31 pm, you wrote: > Yeah, I'm assuming it's set. I have an installed ssl cert from a CA and > have successfully run other https scripts (by typing in the URL) on the > server. > > I check phpinfo(), http://www.tgwedding.com/tgwedding/phpinfo.php > php, http, ftp, https, ftps, compress.bzip2, compress.zlib > > I searched php.ini for "ssl" and "https" and didn't find anything though > > > -----Original Message----- > From: Andre Dubuc [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 17, 2004 8:26 PM > To: Ryan Schefke > Subject: Re: [PHP] http to https > > Just a thought - is https on the server set? (Check your php.ini) > > On Thursday 17 June 2004 08:20 pm, Ryan Schefke wrote: > > Hi Andre, > > > > Thanks for responding. I'm not using sessions, just cookies. I used > > your recommendation in the code below (which gets executed if the submit > > button is pushed. It still sends it to > > "http://www.tgwedding.com/payment6.php" instead of > > "https://www.tgwedding.com/payment6.php" > > > > Any advice please? > > > > ==================================== > > if (isset($submit)) { > > if ($radiobutton == 1) { > > $value=$validcoupon; > > } else { > > $value=0; > > } > > $query_insertcoupon = "UPDATE sitepayment SET couponcode='$value' > > WHERE customerID='$CID'"; > > $result_insertcoupon = mysql_query ($query_insertcoupon); // run the > > query > > if ($_SERVER['HTTPS'] != "on"){ > > header("Location: https://www.tgwedding.com/payment6.php"); > > exit;} > > > > // $redirect = "https://www.tgwedding.com/payment6.php"; > > // header ("Location: $redirect"); > > } > > ===================================== > > > > > > > > > > > > > > > > > > -----Original Message----- > > From: Andre Dubuc [mailto:[EMAIL PROTECTED] > > Sent: Thursday, June 17, 2004 8:01 PM > > To: Ryan Schefke; [EMAIL PROTECTED] > > Subject: Re: [PHP] http to https > > > > Hi Ryan, > > > > I encountered all sorts of problems attempting to do the same (especially > > with > > AOL, Yahoo, etc click-throughs). > > > > I finally resolved the problem by calling https on the page itself (which > > is > > > > listed then as http) like so at the top (after my session_start(); of > > course: > > > > <?php if ($_SERVER['HTTPS'] != "on"){ > > header("Location: https://www.your_site.com.php"); > > exit;} > > ?> > > > > > > Hth, > > Andre > > > > On Thursday 17 June 2004 07:27 pm, Ryan Schefke wrote: > > > I'm getting some strange behavior when trying to go from http to an > > https > > > > script. > > > > > > > > > > > > After clicking a form submit button the script will execute the two > > lines > > > > below. It does this and sends it to the correct page without the > > > https, only http. What is strange is when I go back on my browswer and > > > resubmit, it correctly sends it to the https location and all is well. > > > > > > > > > > > > $redirect = "https://www.tgwedding.com/payment6.php"; > > > > > > header ("Location: $redirect"); > > > > > > > > > > > > > > > > > > What am I doing wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php