-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_home.php
88 lines (80 loc) · 2.76 KB
/
_home.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
$phone_numbers = array (
"AhLoi" => "016 - 42152222",
"Ahmad" => "014 - 25155223",
"Bruce" => "012 - 5221334",
"Andrew" => "014 - 25124423"
);
if (isset($_GET["name"])) {
$name = $_GET["name"];
}
if (isset($name)) {
$number = $phone_numbers[$name];
} else {
$number = "";
$name = "";
}
?>
<div id="main">
<div id="left-container">
<div id="profile">
<h3 class="title">Profile</h3>
<img src= <?= $picture[rand(0,2)] ?> width="250" height="250">
</div>
<div id="phone-number-search">
<form method="get" action="home.php">
<h3 class="title">Phone number search</h3>
Person name: <input type="text" name="name"> <br>
<input type="submit">
<?php
if(isset($number)) {
echo "<h3> ".$name. " ".$number;
}
?>
</form>
</div>
</div>
<div id="right-container">
<h3 class="title">Tweets</h3>
<div class="post new-post">
<form method="POST" action="home.php" class="">
<div class="left">
<h3>New Post</h3>
</div>
<div class="right">
Title: <input type="text" name="title" class="post-input">
Content: <textarea name="content" class="post-input"></textarea>
<input type="submit" class="submit-post">
</div>
</form>
</div>
<div class="post-container">
<div class="post">
<h3 class="post-title">My first tweet !</h3>
<p class="post-content">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</div>
<div class="post">
<h3 class="post-title">Another tweet !</h3>
<p class="post-content">
Port-salut cheese and biscuits cheese on toast. The big cheese the big cheese
stilton chalk and cheese goat boursin when the cheese comes out everybody's
happy jarlsberg. Hard cheese cheesy feet st. agur blue cheese manchego fondue
dolcelatte cheesy grin halloumi. Cheesy feet lancashire cheese and wine goat
blue castello.
</p>
</div>
<div class="post">
<h3 class="post-title"><?= $title ?></h3>
<p class="post-content"><?= $content ?></p>
</div>
</div>
</div>
<div id="footer"></div>
</div>