Insert Server Behavior & Navigation with pages stored in SSL folder
I tested all navigations, database updates, and connections to my remote server without SSL and all is working perfectly!
Now, I need to move the private php pages into an SSL folder.
I created the ssl folder on my remote server and made the same changes on my local server...all is in sync.
I have an insert server behavior on my 1st php file stored in the ssl folder.
The server behavior asks where to go after the insert. I've entered several things here, starting with the basic navigation to my file within the ssl folder using the browse button on the insert server behavior pop-up screen to entering the full blown secure URL that is generated by my Web Hosting company (included below). Every time I submit my 1st php file on the web, I receive a Sorry.Gone erorr from my Web Hosting site and my data doesn't get updated into my database table.
I have validated that the URL I enter after $insertGoTo pulls up the correct page when I plug it into the web url address field. My php form is definately on my remote server site without issues.
As mentioned inititally, I tested all of my .php forms and successfully updated my database and navigated to the correct .php form after successful insert when not using the ssl folder. And I did check/change all of my links where applicable to ensure that they are pointing to files/images in the new ssl folder.
Something has to be happening between the database insert (which fails) and the navigation to the next .php page inside the ssl folder.
Since I give all of this instruction to Dreamweaver through the insert server behavior, I'm hoping Dreamweaver experts can point me in the right direction.
Here is a scrubbed version of the insert code in my 1st php page. I just don't know what I have to enter as the URL for the $insertGoTo command in order for this to work properly.
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "Form1")) {
$insertSQL = sprintf("INSERT INTO Table1 (Field1, Field2) VALUES (%s, %s)",
GetSQLValueString($_POST['Field1'], "text"),
GetSQLValueString($_POST['Field2'], "text"));
mysql_select_db($database_connSite, $connSite);
$Result1 = mysql_query($insertSQL, $connSite) or die(mysql_error());
$insertGoTo = "http://www.domain.com/ssl/Form2.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
My web hosting company stated that I would need to enter the entire URL, but that didn't work either. Here is an example of the entire URL with secure prefix: https://p8.secure.hostingprod.com/@www.domain.com/ssl/Form2.php
Thank you!!
