forked from andreasHausberger/Taxperiment_MLW
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexternal_test.php
48 lines (32 loc) · 1.13 KB
/
external_test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
require_once("resources/config.php");
require_once ("code/code.php");
require_once("public/templates/header.php");
echo "<h1> Test </h1>";
$page = postParamValue("exp_page");
$user = postParamValue("username");
$round = postParamValue("round");
?>
<form action="external_test.php" method="POST">
<label for="username">Username:</label>
<input type="text" name="username" value="<?php echo $user?>">
<label for="round">Round:</label>
<input type="text" name="round" value="<?php echo $round?>">
<label for="round">Page:</label>
<select name="exp_page">
<option value="slider">Slider</option>
<option value="audit">Audit</option>
<option value="feedback">Feedback</option>
</select>
<input type="submit" value="Run">
</form>
<?php
if ($page != "" && $user != "" && $round != "") {
$server = $_SERVER["HTTP_ORIGIN"];
echo "<iframe style='width: 800px; height: 800px' src=\"$server/external/index.php?page=$page&i=$user&round=$round\" frameborder=\"0\"></iframe>";
}
else {
echo "Fill out form to start!";
}
?>
<?php require_once("public/templates/footer.php"); ?>