spoco Posted September 8, 2009 Share Posted September 8, 2009 Hello, I have two PHP pages that I have created. The user page contains a form that a user can fill out and submit. Once submitted, I want the data to write to a MySQL database and take the user to another page that shows what they entered (allows them to print for their records) I can do one or the other, but not both. In the working version that writes to the database, the form action is: <form name="form1" id="form1" method="POST" action="<?php echo $editFormAction; ?>"> $editFormAction is: $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 lessonplan (FName, LastName, school, CourseName, GradeLevel, Dates, LessonTitle, FrameworkSubject, essential, understand, Skills, realworld, pertasks, otherevidence, otherev, Activities, resources, Modifications, othermod, accelmodifications, othermodacc) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['FName'], "text"), GetSQLValueString($_POST['LastName'], "text"), GetSQLValueString($_POST['school'], "text"), GetSQLValueString($_POST['CourseName'], "text"), GetSQLValueString($_POST['GradeLevel'], "text"), GetSQLValueString($_POST['Dates'], "text"), GetSQLValueString($_POST['LessonTitle'], "text"), GetSQLValueString($_POST['FrameworkSubject'], "text"), GetSQLValueString($_POST['essential'], "text"), GetSQLValueString($_POST['understand'], "text"), GetSQLValueString($_POST['Skills'], "text"), GetSQLValueString($_POST['realworld'], "text"), GetSQLValueString($_POST['pertasks'], "text"), GetSQLValueString($_POST['otherevidence'], "text"), GetSQLValueString($_POST['otherev'], "text"), GetSQLValueString($_POST['Activities'], "text"), GetSQLValueString($_POST['resources'], "text"), GetSQLValueString($_POST['Modifications'], "text"), GetSQLValueString($_POST['othermod'], "text"), GetSQLValueString($_POST['accelmodifications'], "text"), GetSQLValueString($_POST['othermodacc'], "text")); mysql_select_db($database_MySQL, $MySQL); $Result1 = mysql_query($insertSQL, $MySQL) or die(mysql_error()); $insertGoTo = "thanks.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } ?> thanks.php is the page that I want the user to go to after they submit, the user goes there, but none of the data posts. If I change the form action to simply "thanks.php," the data posts to the thanks.php page but does not write to the database. thanks.php looks like this: <p>Please save or print this page for your records.</p> <table width="893" border="0"> <tr> <td width="202">Teacher Name:</td> <td width="681"><?php echo $_POST ["FName"]; ?> <?php echo $_POST ["LastName"]; ?> </td> </tr> <tr> <td>School:</td> <td><?php echo $_POST ["school"]; ?></td> </tr> <tr> <td>Course Name:</td> <td><?php echo $_POST ["CourseName"]; ?></td> </tr> <tr> <td>Grade Level:</td> <td><?php echo $_POST ["GradeLevel"]; ?></td> </tr> <tr> <td>Dates:</td> <td><?php echo $_POST ["Dates"]; ?></td> </tr> <tr> <td>Lesson Title:</td> <td><?php echo $_POST ["LessonTitle"]; ?></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td>RCSD Framework: </td> <td><?php echo $_POST ["Framework"]; ?></td> </tr> <tr> <td>Essential Questions:</td> <td><?php echo $_POST ["essential"]; ?></td> </tr> <tr> <td>Students Will Understand:</td> <td><?php echo $_POST ["understand"]; ?></td> </tr> <tr> <td>Students Will Be Able To:</td> <td><?php echo $_POST ["Skills"]; ?></td> </tr> <tr> <td>Real World Appreciation: </td> <td><?php echo $_POST ["realworld"]; ?></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td>Performance Tasks</td> <td><?php echo $_POST ["pertasks"]; ?></td> </tr> <tr> <td>Other Evidence</td> <td><?php echo $_POST ["otherevidence"]; ?> <?php echo $_POST ["otherev"]; ?></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td>Learning Activities:</td> <td><?php echo $_POST ["Activities"]; ?></td> </tr> <tr> <td>Resources Needed:</td> <td><?php echo $_POST ["resources"]; ?></td> </tr> <tr> <td>Modifications for Struggling Learners:</td> <td><?php echo $_POST ["Modifications"]; ?> <?php echo $_POST ["othermod"]; ?></td> </tr> <tr> <td>Modifications for Accellerated Learners:</td> <td><?php echo $_POST ["accelmodifications"]; ?> <?php echo $_POST ["othermodacc"]; ?></td> </tr> That is not the complete code, byt the rest of it is just the other data fields. What am I doing wrong? Quote Link to comment https://forums.phpfreaks.com/topic/173587-solved-having-ttouble-doing-two-things-at-once/ Share on other sites More sharing options...
mikesta707 Posted September 8, 2009 Share Posted September 8, 2009 Post data does not go from page to page unless it is submitted. Since no form data was submit to your thanks.php page, it doesn't have access to it like the page before it did. if you want that to have access to the form data you are going to have to pass it through hidden fields and submit those hidden fields when you go through the page. alternatively, when someone registers, you can set a session with their specific id, or other primary key for your table, and draw the row that was just insert with that id and generate the values again. Quote Link to comment https://forums.phpfreaks.com/topic/173587-solved-having-ttouble-doing-two-things-at-once/#findComment-914984 Share on other sites More sharing options...
spoco Posted September 8, 2009 Author Share Posted September 8, 2009 There is no registration required for this page, so I do not believe that sessions are a possibility. How would I go about passing all of the data through a hidden field? Sorry, I am just learning PHP. Quote Link to comment https://forums.phpfreaks.com/topic/173587-solved-having-ttouble-doing-two-things-at-once/#findComment-914993 Share on other sites More sharing options...
mikesta707 Posted September 8, 2009 Share Posted September 8, 2009 sessions have no connection to registration. As long as there is a column that has a unique value for every row, you can get that value and store it to a session, and then retrieve that row on any page that has access to that session. However, since you are using a header for a redirect, It would be hard to use hidden fields, because you will have to submit the form somehow, and I don't believe you can do that if you are using a header redirect. Besides, since you are using headers, there is obviously no output, why don't you just include the thankyou page after you process the form? Quote Link to comment https://forums.phpfreaks.com/topic/173587-solved-having-ttouble-doing-two-things-at-once/#findComment-914997 Share on other sites More sharing options...
spoco Posted September 8, 2009 Author Share Posted September 8, 2009 why don't you just include the thankyou page after you process the form? This sounds like exactly what I need to do, however I have no idea how to do this or where to get help doing it. New to PHP and programming in general. Quote Link to comment https://forums.phpfreaks.com/topic/173587-solved-having-ttouble-doing-two-things-at-once/#findComment-915000 Share on other sites More sharing options...
mikesta707 Posted September 8, 2009 Share Posted September 8, 2009 //after stuff include("thankyoupage.php"); or just copy and paste the stuff from the thankyou page to the end of the other page. Quote Link to comment https://forums.phpfreaks.com/topic/173587-solved-having-ttouble-doing-two-things-at-once/#findComment-915004 Share on other sites More sharing options...
spoco Posted September 8, 2009 Author Share Posted September 8, 2009 I guess I don't get it. I added your line of code in the user page and it doesn't seem to be doing anything. Quote Link to comment https://forums.phpfreaks.com/topic/173587-solved-having-ttouble-doing-two-things-at-once/#findComment-915010 Share on other sites More sharing options...
mikesta707 Posted September 8, 2009 Share Posted September 8, 2009 post the code. lets see what you got Quote Link to comment https://forums.phpfreaks.com/topic/173587-solved-having-ttouble-doing-two-things-at-once/#findComment-915017 Share on other sites More sharing options...
spoco Posted September 8, 2009 Author Share Posted September 8, 2009 User Page: <?php require_once('../Connections/MySQL.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $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 lessonplan (FName, LastName, school, CourseName, GradeLevel, Dates, LessonTitle, FrameworkSubject, essential, understand, Skills, realworld, pertasks, otherevidence, otherev, Activities, resources, Modifications, othermod, accelmodifications, othermodacc) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['FName'], "text"), GetSQLValueString($_POST['LastName'], "text"), GetSQLValueString($_POST['school'], "text"), GetSQLValueString($_POST['CourseName'], "text"), GetSQLValueString($_POST['GradeLevel'], "text"), GetSQLValueString($_POST['Dates'], "text"), GetSQLValueString($_POST['LessonTitle'], "text"), GetSQLValueString($_POST['FrameworkSubject'], "text"), GetSQLValueString($_POST['essential'], "text"), GetSQLValueString($_POST['understand'], "text"), GetSQLValueString($_POST['Skills'], "text"), GetSQLValueString($_POST['realworld'], "text"), GetSQLValueString($_POST['pertasks'], "text"), GetSQLValueString($_POST['otherevidence'], "text"), GetSQLValueString($_POST['otherev'], "text"), GetSQLValueString($_POST['Activities'], "text"), GetSQLValueString($_POST['resources'], "text"), GetSQLValueString($_POST['Modifications'], "text"), GetSQLValueString($_POST['othermod'], "text"), GetSQLValueString($_POST['accelmodifications'], "text"), GetSQLValueString($_POST['othermodacc'], "text")); mysql_select_db($database_MySQL, $MySQL); $Result1 = mysql_query($insertSQL, $MySQL) or die(mysql_error()); $insertGoTo = "thanks.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; include("thanks.php"); } header(sprintf("Location: %s", $insertGoTo)); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Lesson Plan Template</title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="form.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- body { background-color: #3b587a; } a:link { color: #000; } --> </style></head> <body> <div id="content"> <div id="colOne"> <h2>Lesson PLan template</h2> <form name="form1" id="form1" method="POST" action="<?php echo $editFormAction; ?>"> <p> <label>Teacher Name: <input type="text" name="FName" id="FName" /> </label> <label> <input type="text" name="LastName" id="LastName" /> </label> </p> <p>High School: <label> <select name="school" id="school"> <option selected="selected">Select School</option> <option value="Brandon">Brandon</option> <option value="Florence">Florence</option> <option value="McLaurin">McLaurin</option> <option value="Northwest Rankin">Northwest Rankin</option> <option value="Pelahatchie">Pelahatchie</option> <option value="Pisgah">Pisgah</option> <option value="Puckett">Puckett</option> <option value="Richland">Richland</option> </select> </label> <br /> <br /> Course Name: <label> <input name="CourseName" type="text" id="CourseName" size="50" /> </label> <br /> </p> Grade Level(s) <em>Check all that apply</em>: <table width="92"> <tr> <td><label> <input type="checkbox" name="GradeLevel" value="9" id="GradeLevel" /> 9th</label></td> </tr> <tr> <td><label> <input type="checkbox" name="GradeLevel" value="10" id="GradeLevel" /> 10th</label></td> </tr> <tr> <td><label> <input type="checkbox" name="GradeLevel" value="11" id="GradeLevel" /> 11th</label></td> </tr> <tr> <td><label> <input type="checkbox" name="GradeLevel" value="12" id="GradeLevel" /> 12th</label></td> </tr> </table> <p>Dates for Lesson/Unit: <label> <input type="text" name="Dates" id="Dates" /> </label> </p> <p>Lesson/Unit Title: <label> <input name="LessonTitle" type="text" id="LessonTitle" size="35" /> </label> </p> <h2><strong>STAGE ONE: DESIRED RESULTS</strong></h2> <p>RCSD Framework (Competency): <select name="FrameworkSubject" id="FrameworkSubject"> <option selected="selected">Select a Course</option> <option value="Business and Technology">Business and Technology</option> <option value="English and Language Arts">English and Language Arts</option> <option value="Foreign Languages">Foreign Languages</option> <option value="Mathematics">Mathematics</option> <option value="Health/PE">Health/PE</option> <option value="Science">Science</option> <option value="Social Studies">Social Studies</option> <option value="Visual and Performing Arts">Visual and Performing Arts</option> </select> <a href="frameworks.html" target="_blank">View Frameworks </a></p> <p> <textarea name="essential2" id="essential2" cols="45" rows="5"></textarea> </p> <p>Essential Questions: </p> <p> <label> <textarea name="essential" id="essential" cols="45" rows="5"></textarea> </label> </p> <p>Students Will Understand <em>(list specifics about content)</em>: </p> <p> <label> <textarea name="understand" id="understand" cols="45" rows="5"></textarea> </label> </p> <p>Students will Be Able To<em> (list skills students will perform)</em>: </p> <p> <label> <textarea name="Skills" id="Skills" cols="45" rows="5"></textarea> </label> </p> <p>Real World Appreciation <em>(how will students connect information learned to the real world)</em>: </p> <p> <label> <textarea name="realworld" id="realworld" cols="45" rows="5"></textarea> </label> </p> <h2><strong>STAGE TWO: ASSESSMENT EVIDENCE</strong></h2> <p>Performance Tasks <em>(list specific activities students will perform and include verb such as write, create, propose, plan, analyze, develop, discuss)</em>. Remember <strong>GRASPS</strong> (Goal, Role, Audience, Situation, Product/Performance/Purpose, Criteria for Success). Put DOK level at the end of each task listed.</p> <p> <textarea name="pertasks" id="pertasks" cols="45" rows="5"></textarea> </p> <p>Other Evidence:</p> <p> <label> <select name="otherevidence" id="otherevidence"> <option selected="selected">Select one</option> <option value="Quiz">Quiz</option> <option value="Homework">Homework</option> <option value="Oral or Written Response">Oral or Written Response</option> <option value="Unit Test">Unit Test</option> <option value="Use of Vocabulary in Context">Use of Vocabulary in Context</option> <option value="Rubric">Rubric</option> <option value="Graphic Display">Graphic Display With Analysis</option> <option value="Survey Data Analysis">Survey Data Analysis</option> <option value="Summary">Summary</option> <option value="Thinking Map">Thinking Map</option> <option value="Notes taken">Notes taken</option> <option value="Original Writing">Original Writing</option> <option value="Small Group Project">Small Group Project</option> <option value="Informal Observation">Informal Observation</option> <option value="Reflection (Written or Oral)">Reflection (Written or Oral)</option> <option value="Other">Other</option> </select> </label> </p> <p>If Other, please specify: <label> <input type="text" name="otherev" id="otherev" /> </label> </p> <h2>STAGE THREE: LEARNING PLAN</h2> <p>Learning Activities (List activities that students will complete.) </p> <p>Remember WHERETO <br /> <strong>W</strong>=ensure that students understand WHERE unit is headed and why<br /> <strong>H</strong>=HOOK students early and HOLD their attention<br /> <strong>E</strong> = EQUIP students with necessary experiences, tools, knowledge, know-how <br /> <strong>R</strong> = provide students with chance to RETHINK their ideas, REFLECT on <br /> progress and REVISE their work<br /> <strong>E</strong> = have students EVALUATE progress and self-assess<br /> <strong>T</strong> = TAILOR to fit individual talents, interests, needs, styles<br /> <strong>O</strong> = be ORGANIZED for deep understanding (not superficial coverage)</p> <p> <textarea name="Activities" id="Activities" cols="45" rows="5"></textarea> </p> <p>Resources Needed:</p> <p> <textarea name="resources" id="resources" cols="45" rows="5"></textarea> </p> <p>Modifications for Struggling Learners (ELL, SPED, Tier 2 and 3):</p> <p> <label> <select name="Modifications" id="Modifications"> <option selected="selected">Select an Option</option> <option value="Peer Help">Peer Help</option> <option value="Oral Testing">Oral Testing</option> <option value="Reduction # Answers">Reduction # Answers</option> <option value="Extra Help">Extra Help</option> <option value="Night Library">Night Library</option> <option value="Extended Time">Extended Time</option> <option value="Tutoring">Tutoring</option> <option value="Leveled Books">Leveled Books</option> <option value="Shorter Assignments">Shorter Assignments</option> <option value="Small Group Instruction">Small Group Instriction</option> <option value="Other">Other</option> </select> </label> </p> <p>If Other, please specify: <label> <input type="text" name="othermod" id="othermod" /> </label> </p> <p>Modifications for Accelerated Learners:</p> <p> <label> <select name="accelmodifications" id="accelmodifications"> <option selected="selected">Select an Option</option> <option value="Modification of assignment to include deeper concepts">Modification of assignment to include deeper concepts</option> <option value="Modification of assignment to include technology use">Modification of assignment to include technology use</option> <option value="Change in difficulty level of assignment">Change in difficulty level of assignment</option> <option value="Other">Other</option> </select> </label> </p> <p>If Other, please specify: <label> <input type="text" name="othermodacc" id="othermodacc" /> </label> </p> <p> <label> <input type="submit" name="Submit Form" id="Submit Form" value="Submit" /> </label> </p> <input type="hidden" name="MM_insert" value="form1" /> </form> <p> </p> </div> <div style="clear: both;"></div> </div> </body> </html> Thanks page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Northwest Rankin Online Lesson Plan Templates</title> <meta name="keywords" content="" /> <meta name="description" content="" /> <style type="text/css"> <!-- body { background-color: #FFF; } a:link { color: #000; } --> </style></head> <body> <h1><strong>Lesson Plan Submitted</strong></h1> <p>Please save or print this page for your records.</p> <table width="893" border="0"> <tr> <td width="202">Teacher Name:</td> <td width="681"><?php echo $_POST ["FName"]; ?> <?php echo $_POST ["LastName"]; ?> </td> </tr> <tr> <td>School:</td> <td><?php echo $_POST ["school"]; ?></td> </tr> <tr> <td>Course Name:</td> <td><?php echo $_POST ["CourseName"]; ?></td> </tr> <tr> <td>Grade Level:</td> <td><?php echo $_POST ["GradeLevel"]; ?></td> </tr> <tr> <td>Dates:</td> <td><?php echo $_POST ["Dates"]; ?></td> </tr> <tr> <td>Lesson Title:</td> <td><?php echo $_POST ["LessonTitle"]; ?></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td>RCSD Framework: </td> <td><?php echo $_POST ["Framework"]; ?></td> </tr> <tr> <td>Essential Questions:</td> <td><?php echo $_POST ["essential"]; ?></td> </tr> <tr> <td>Students Will Understand:</td> <td><?php echo $_POST ["understand"]; ?></td> </tr> <tr> <td>Students Will Be Able To:</td> <td><?php echo $_POST ["Skills"]; ?></td> </tr> <tr> <td>Real World Appreciation: </td> <td><?php echo $_POST ["realworld"]; ?></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td>Performance Tasks</td> <td><?php echo $_POST ["pertasks"]; ?></td> </tr> <tr> <td>Other Evidence</td> <td><?php echo $_POST ["otherevidence"]; ?> <?php echo $_POST ["otherev"]; ?></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td>Learning Activities:</td> <td><?php echo $_POST ["Activities"]; ?></td> </tr> <tr> <td>Resources Needed:</td> <td><?php echo $_POST ["resources"]; ?></td> </tr> <tr> <td>Modifications for Struggling Learners:</td> <td><?php echo $_POST ["Modifications"]; ?> <?php echo $_POST ["othermod"]; ?></td> </tr> <tr> <td>Modifications for Accellerated Learners:</td> <td><?php echo $_POST ["accelmodifications"]; ?> <?php echo $_POST ["othermodacc"]; ?></td> </tr> <tr> <td> </td> <td> </td> </tr> </table> <p> </p> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/173587-solved-having-ttouble-doing-two-things-at-once/#findComment-915020 Share on other sites More sharing options...
mikesta707 Posted September 8, 2009 Share Posted September 8, 2009 well.. you never included anything <?php require_once('../Connections/MySQL.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $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 lessonplan (FName, LastName, school, CourseName, GradeLevel, Dates, LessonTitle, FrameworkSubject, essential, understand, Skills, realworld, pertasks, otherevidence, otherev, Activities, resources, Modifications, othermod, accelmodifications, othermodacc) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['FName'], "text"), GetSQLValueString($_POST['LastName'], "text"), GetSQLValueString($_POST['school'], "text"), GetSQLValueString($_POST['CourseName'], "text"), GetSQLValueString($_POST['GradeLevel'], "text"), GetSQLValueString($_POST['Dates'], "text"), GetSQLValueString($_POST['LessonTitle'], "text"), GetSQLValueString($_POST['FrameworkSubject'], "text"), GetSQLValueString($_POST['essential'], "text"), GetSQLValueString($_POST['understand'], "text"), GetSQLValueString($_POST['Skills'], "text"), GetSQLValueString($_POST['realworld'], "text"), GetSQLValueString($_POST['pertasks'], "text"), GetSQLValueString($_POST['otherevidence'], "text"), GetSQLValueString($_POST['otherev'], "text"), GetSQLValueString($_POST['Activities'], "text"), GetSQLValueString($_POST['resources'], "text"), GetSQLValueString($_POST['Modifications'], "text"), GetSQLValueString($_POST['othermod'], "text"), GetSQLValueString($_POST['accelmodifications'], "text"), GetSQLValueString($_POST['othermodacc'], "text")); mysql_select_db($database_MySQL, $MySQL); $Result1 = mysql_query($insertSQL, $MySQL) or die(mysql_error()); $insertGoTo = "thanks.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } //header(sprintf("Location: %s", $insertGoTo)); dont need this include("thanks.php"); exit();//only include this is you DONT want to output the HTML below this line } ?> Quote Link to comment https://forums.phpfreaks.com/topic/173587-solved-having-ttouble-doing-two-things-at-once/#findComment-915040 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.