Hello I am currently working a form here, and I have everything figured out except when I click the return button from my preview view. the information is lost in all the textarea's. Any clue what I am doing wrong here? It doesn't matter what is typed into the textarea just need to return to the editing view with the information.
Thanks
Code: <!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>
<title>Lesson Plan</title>
<LINK REL=StyleSheet HREF="../style.css" TYPE="text/css" MEDIA=screen>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<?PHP
$emailTo = 'pinder@address.com';
$session = $_POST['session'];
$module = $_POST['module'];
$subject = $_POST['subject'];
$jobTask = $_POST['jobTask'];
$trainingObjective = $_POST['trainingObjective'];
$subobjective1 = $_POST['subobjective1'];
$subobjective2 = $_POST['subobjective2'];
$subobjective3 = $_POST['subobjective3'];
$subobjective4 = $_POST['subobjective4'];
$subobjective5 = $_POST['subobjective5'];
$instructionalTechniques = $_POST['instructionalTechniques'];
$trainingAids = $_POST['trainingAids'];
$trainingTime = $_POST['trainingTime'];
$references = $_POST['references'];
if ($session == 'S1A'){$select01 = 'selected';}
elseif($session == 'S1B'){$select02 = 'selected';}
elseif($session == 'S2A'){$select03 = 'selected';}
elseif($session == 'S2B'){$select04 = 'selected';}
elseif($session == 'S3A'){$select05 = 'selected';}
elseif($session == 'S3B'){$select06 = 'selected';}
elseif($session == 'S4A'){$select07 = 'selected';}
elseif($session == 'S4B'){$select08 = 'selected';}
elseif($session == 'FSA'){$select09 = 'selected';}
elseif($session == 'FSB'){$select10 = 'selected';}
elseif($session == 'FSC'){$select11 = 'selected';}
if($trainingTime == '30 Minutes'){$selectT01 = 'selected';}
elseif($trainingTime == '1 Hour'){$selectT02 = 'selected';}
elseif($trainingTime == '1.5 Hours'){$selectT03 = 'selected';}
elseif($trainingTime == '2 Hours'){$selectT04 = 'selected';}
elseif($trainingTime == '2.5 Hours'){$selectT05 = 'selected';}
elseif($trainingTime == '3 Hours'){$selectT06 = 'selected';}
elseif($trainingTime == '3.5 Hours'){$selectT07 = 'selected';}
elseif($trainingTime == '4 Hours'){$selectT08 = 'selected';}
elseif($trainingTime == '4.5 Hours'){$selectT09 = 'selected';}
elseif($trainingTime == '5 Hours'){$selectT10 = 'selected';}
elseif($trainingTime == '5.5 Hours'){$selectT11 = 'selected';}
elseif($trainingTime == '6 Hours'){$selectT12 = 'selected';}
elseif($trainingTime == '6.5 Hours'){$selectT13 = 'selected';}
elseif($trainingTime == '7 Hours'){$selectT14 = 'selected';}
elseif($trainingTime == '7.5 Hours'){$selectT15 = 'selected';}
elseif($trainingTime == '8 Hours'){$selectT16 = 'selected';}
?>
<fieldset>
<legend>Lesson Plan</legend>
<form method="post" name="LessonPlanForm" action="<?PHP echo $_SERVER['PHP_SELF'];?>">
<?PHP
if (isset($_POST['Preview'])&& !isset($_POST['Submit'])){
?>
Session:<br /><?PHP echo $_POST['session'];?></br />
Module:<br /><?PHP echo $_POST['module'];?><br />
Subject:<br /><?PHP echo $_POST['subject'];?><br />
Job Task:<br /><?PHP echo $_POST['jobTask'];?><br />
Training Objective:<br /><?PHP echo $_POST['trainingObjective'];?><br />
Sub-Objective 1:<br /><?PHP echo $_POST['subobjective1'];?><br />
Sub-Objective 2:<br /><?PHP echo $_POST['subobjective2'];?><br />
Sub-Objective 3:<br /><?PHP echo $_POST['subobjective3'];?><br />
Sub-Objective 4:<br /><?PHP echo $_POST['subobjective4'];?><br />
Sub-Objective 5:<br /><?PHP echo $_POST['subobjective5'];?><br />
Instructional Techniques:<br /><?PHP echo $_POST['instructionalTechniques'];?><br />
Training Aids:<br /><?PHP echo $_POST['trainingAids'];?><br />
Training Time:<br /><?PHP echo $_POST['trainingTime'];?><br />
References:<br /><?PHP echo $_POST['references'];?><br />
<input type='submit' value='Return' name='Return' />
<?PHP
}
if(isset($_POST['Submit'])){
$message = "Session:<br />$session<br />
Module:<br />$module<br />
Subject:<br /> $subject<br />
Job Task:<br /> $jobTask<br />
Training Objective:<br/> $trainingObjective<br />
Sub-Objective 1:<br /> $subobjective1<br />
Sub-Objective 2:<br /> $subobjective2<br />
Sub-Objective 3:<br /> $subobjective3<br />
Sub-Objective 4:<br /> $subobjective4<br />
Sub-Objective 5:<br /> $subobjective5<br />
Instructional Techniques:<br /> $instructionalTechniques<br />
Training Aids:<br /> $trainingAids<br />
Training Time:<br /> $trainingTime<br />
References:<br /> $references<br />";
mail($emailTo,$subject,$message);
echo "Form submit complete<br />";
echo "<input type='submit' value='Return' name='Return' /><br />";
}
if ((!isset($_POST['Submit'])|| isset($_POST['Return'])) && !isset($_POST['Preview']))
{
?>
<div id="mainForm">
Session:<br />
<select name="session">
<option value="S1A" <?PHP echo $select01;?>>Sector 1 Session A</option>
<option value="S1B" <?PHP echo $select02;?>>Sector 1 Session B</option>
<option value="S2A" <?PHP echo $select03;?>>Sector 2 Session A</option>
<option value="S2B" <?PHP echo $select04;?>>Sector 2 Session B</option>
<option value="S3A" <?PHP echo $select05;?>>Sector 3 Session A</option>
<option value="S3B" <?PHP echo $select06;?>>Sector 3 Session B</option>
<option value="S4A" <?PHP echo $select07;?>>Sector 4 Session A</option>
<option value="S4B" <?PHP echo $select08;?>>Sector 4 Session B</option>
<option value="FSA" <?PHP echo $select09;?>>Fundamental Skills Session A</option>
<option value="FSB" <?PHP echo $select10;?>>Fundamental Skills Session B</option>
<option value="FSC" <?PHP echo $select11;?>>Fundamental Skills Session C</option>
</select><br />
Module:<br />
<textarea name="module" rows="2" cols="60"><?php echo $_POST['module'];?></textarea><br />
Subject:<br />
<textarea name="subject" rows="1" cols="90"><?php echo $_POST['subject'];?></textarea><br />
Job Task:<br />
<textarea name="jobTask" rows="1" cols="90"><?php echo $_POST['jobTask'];?></textarea><br />
Training Objective:<br />
<textarea name="trainingObjective" rows="3" cols="90"><?php echo $_POST['trainingObjective'];?></textarea><br />
Sub-Objectives or Steps:<br />
1.<textarea name="subobjective1" rows="3" cols="50"><?php echo $_POST['subobjective1'];?></textarea><br />
2.<textarea name="subobjective2" rows="3" cols="50"><?php echo $_POST['subobjective2'];?></textarea><br />
3.<textarea name="subobjective3" rows="3" cols="50"><?php echo $_POST['subobjective3'];?></textarea><br />
4.<textarea name="subobjective4" rows="3" cols="50"><?php echo $_POST['subobjective4'];?></textarea><br />
5.<textarea name="subobjective5" rows="3" cols="50"><?php echo $_POST['subobjective5'];?></textarea><br />
Instructional Techniques:<br />
<textarea name="instructionalTechniques" rows="5" cols="90"><?php echo $_POST['instructionalTechniques'];?></textarea><br />
Training Aids Required:<br />
<textarea name="trainingAids" rows="3" cols="90"><?php echo $_POST['trainingAids'];?></textarea><br />
Training Time Required:<br />
<select name="trainingTime">
<option value="30 Minutes" <?PHP echo $selectT01;?>>30 Minutes</option>
<option value="1 Hour" <?PHP echo $selectT02;?>>1 Hour</option>
<option value="1.5 Hours" <?PHP echo $selectT03;?>>1.5 Hours</option>
<option value="2 Hours" <?PHP echo $selectT04;?>>2 Hours</option>
<option value="2.5 Hours" <?PHP echo $selectT05;?>>2.5 Hours</option>
<option value="3 Hours" <?PHP echo $selectT06;?>>3 Hours</option>
<option value="3.5 Hours" <?PHP echo $selectT07;?>>3.5 Hours</option>
<option value="4 Hours" <?PHP echo $selectT08;?>>4 Hours</option>
<option value="4.5 Hours" <?PHP echo $selectT09;?>>4.5 Hours</option>
<option value="5 Hours" <?PHP echo $selectT10;?>>5 Hours</option>
<option value="5.5 Hours" <?PHP echo $selectT11;?>>5.5 Hour</option>
<option value="6 Hours" <?PHP echo $selectT12;?>>6 Hours</option>
<option value="6.5 Hours" <?PHP echo $selectT13;?>>6.5 Hours</option>
<option value="7 Hours" <?PHP echo $selectT14;?>>7 Hours</option>
<option value="7.5 Hours" <?PHP echo $selectT15;?>>7.5 Hours</option>
<option value="8 Hours" <?PHP echo $selectT16;?>>8 Hours</option>
</select><br />
References:<br />
<textarea name="references" rows="4" cols="90"><?PHP echo $_POST['references'];?></textarea><br />
<input name="Submit" type="submit" value="Submit" />
<input name="Preview" type="submit" value="Preview" />
</div>
<?PHP
} ?>
</form>
</fieldset>
</body>
</html>
How to store checkbox array in a session, and then be able to add to it?
I'm trying to store an array of checkbox values into a session array, sort of like a shopping cart, but I can't figure out how to not overwrite the sessions array each time new checkbox values are
Unifying logins of two different scripts
I have two different game scripts which I want to embed on my own site. The problem is I don't want users to create 3 different accounts - one for main site and 2 other for games. I want them to just
multiple recipients + dbuser mail recall
Hello,I am building a php login script.When the user registers the script will send him a confimation email using this codemail($usr_email, "Login Details", $message, "From:
Random Number Generation And Probability
Hello, I am working on a function which has to insert data into a SQL table.we have to supply the function with number of entry needs to be inserted into the database and the work of the function is
Displaying Column Names
I have a question regarding the ability to show the column names from my table/query.What I'm looking to do is to be able to have my users enter their own query via a builder (Which I haven't built
Using cURL to PUT
Can somebody help with the correct php code to make a cURL PUT request. Here is a sample of code below that uses POST, but I need to modify this one so that it uses PUT instead.Code: <?php
Where do I put CRON code
So I've figured out alot about how to automatically run a php function. I can't figure out where to put the CRON code do I put it in the header between the head tags? do I put it before any html code?
sapgui f4 help last search
I know this has to be simople. One user (maybe more) does not have the "last search saved" from the t-code for looking up items in our system. I noticed that on the main menu HELP->SETTINGS
output printing as hexadecmal... XD
Everything works except the calcem call for the totusold and totuprice. The out put shows up as hex. Im not positive but i think i might have to use PBV or PBR?
MYSQL gen help
This is my Mysql gen. can anyone tell me why this echosMID(networkset.networkid, 3, 3) AS "MNC" SELECT FROM scan JOIN gps ON scan.gpsid = gps.gpsid JOIN gsmscanset ON scan.scanid =