-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphp.php
More file actions
41 lines (38 loc) · 974 Bytes
/
Copy pathphp.php
File metadata and controls
41 lines (38 loc) · 974 Bytes
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
<?php
$arrayvals = $_POST['input_arrayvals'];
$cakearray = explode(",", $arrayvals);
$cakeheader = "";
$cakecontent = "";
foreach($cakearray as $value){
$cakecontent .= $value;
$cakeheader .= strlen($value) . ",";
}
$cakeheader = trim($cakeheader, ",");
$finalstring = $cakeheader . "|" . $cakecontent;
?>
<h4>PHP</h4>
<strong>PHPCake:</strong><div id="bakedcake">
<?php
echo $finalstring;
?>
</div>
<br />
<strong>Cake Header:</strong>
<div id="cakeheader">
<?php
echo $cakeheader;
?>
</div>
<br />
<strong>Cake Content</strong>
<div id="cakecontent">
<?php
echo $cakecontent;
?>
</div>
<form>
<?php
echo '<input type="hidden" name="stringcontent" id="stringcontent" value="' . $finalstring . '" />'
?>
<button ic-post-to="php_unbake.php" ic-target="#viewport-bottom" type="submit" id="btn_unbake" name="btn_unbake" class="btn btn-danger" type="button">Unbake the cake</button>
</form>