I created a Javascript application that creates a moving quote.(http://economymoving.net/get_an_online_moving_quote.php)
The quote page should insert a record in the db, display the record on a new page called viewquote.php and send an alert email to the company. Currently, the phpmyadmin database receives the record but viewquote.php doesn't display the correct quote. It shows the same wrong quote each time. For now, the email is generated when viewquote.php loads but it would be better to send the email from the quote page.
I am working with Dreamweaver CS5 and phpMyAdmin 5.1
I'm pretty sure this is the section of code that's causing the issue.
:: quote page ::
mysql_select_db($database_writeQuote, $writeQuote);
$Result1 = mysql_query($insertSQL, $writeQuote) or die(mysql_error());
$insertGoTo = "viewquote.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
I sure would appreciate your help. While searching for an answer I noticed there are some very talented folks on this website!