Changeset 153 for Dev/trunk/surveycreation.php
- Timestamp:
- 11/15/11 11:01:31 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/surveycreation.php
r95 r153 5 5 redirect('index.php'); 6 6 7 $savedSurvey = null; 8 $timeStamp = null; 7 if (isset($_POST['submit'])) { 8 if (isset($_POST['surveyName'])) { 9 $survey = new Survey(null, $_POST['surveyName'], "Thijs", null); 10 $dbi = new DatabaseInterface(); 11 $dbi->set($survey); 12 } 13 } 9 14 10 15 16 17 18 /* 19 $savedSurvey = null; 20 $timeStamp = null; 21 */ 22 11 23 /* LOAD SURVEY */ 12 if (isset($_POST['UID'])) { 13 $surveyID = $_POST['UID']; 14 $surveyDBI = new SurveyCreationDatabaseInterface($surveyID); 15 $info = $surveyDBI->getSurveyInfo(); 24 /* 25 if (isset($_POST['UID'])) { 26 $surveyID = $_POST['UID']; 27 $surveyDBI = new SurveyCreationDatabaseInterface($surveyID); 28 $info = $surveyDBI->getSurveyInfo(); 16 29 17 $savedSurvey = Survey::getSurvey($info); 18 } 30 $savedSurvey = Survey::getSurvey($info); 31 } 32 */ 33 /* AUTOSAVE */ 19 34 20 /* AUTOSAVE */21 else if (isset($_POST['timeStamp'])) {22 35 /* 36 else if (isset($_POST['timeStamp'])) { 37 $timeStamp = $_POST['timeStamp']; 23 38 24 25 26 27 28 29 30 31 32 39 echo 'This is what gets sent:'; 40 var_dump($_POST); 41 echo '<br/><br/>'; 42 $surveyDBI = new SurveyCreationDatabaseInterface($_POST['surveyID']); 43 $surveyDBI->setSurveyInfo($_POST,$_SESSION); 44 $info = $surveyDBI->getSurveyInfo(); 45 echo '<br/><br/>'; 46 echo 'This is what I get back:'; 47 var_dump($info); 33 48 34 $savedSurvey = Survey::getSurvey($info); 35 } 49 $savedSurvey = Survey::getSurvey($info); 50 } 51 52 */ 36 53 ?> 37 54 … … 42 59 <head> 43 60 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 44 45 <?php new StyleSheet(); ?>61 <title>Survey Creation</title> 62 <?php new StyleSheet("awesome"); ?> 46 63 </head> 47 64 <body> … … 52 69 53 70 <div id="content"> 54 <?php 55 new SurveyCreationTool($savedSurvey, $timeStamp); 56 ?> 71 <form action="surveycreation.php" method="post"> 72 <fieldset> 73 Name: <input type="text" name="surveyName" /><br /> 74 Uid: <input type="text" name="surveyID" /><br /><br /> 75 <input type="submit" name="submit" value="Make fake survey!" /> 76 </fieldset> 77 </form> 57 78 </div> 58 79 </div>
Note: See TracChangeset
for help on using the changeset viewer.