THE VIEW.
This tutorial is assuming that you know good amount of HTML, CSS and basics of PHP, so this should be the easiest step.
<html>
<head>
<title>Welcome to CodeIgniter shoutbox!</title>
<style type="text/css">
body {
background-color: #fff;
margin: 40px;
font-family: Lucida Grande, Verdana, Sans-serif;
font-size: 14px;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 16px;
font-weight: bold;
margin: 24px 0 2px 0;
padding: 5px 0 6px 0;
}
code {
font-family: Monaco, Verdana, Sans-serif;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
</style>
</head>
<body>
<h1>Welcome to Shout Box!</h1>
<p>Recent shouts</p>
<?php foreach($shout as $shout): ?>
<code> <b><?php echo $shout->name.' says -';?></b><br><?php echo $shout->shout?></code>
<?php endforeach; ?>
<p>The corresponding controller for this page is found at:</p>
<code>system/application/controllers/welcome.php</code>
<p><b>Submit your own SHOUT!!</b></p>
<form action="http://localhost/shoutbox/index.php/welcome/shout" method="post">
<fieldset>
<legend>ShoutInfo:</legend>
Name:<input type="text" name="name" />
What to Shout?:<input type="text" name="shout" />
Email:<input type="text" name="email" />
<input type="submit" value="submit" name="submit" />
</fieldset>
</form>
<p><br />Page rendered in {elapsed_time} seconds</p>
</body>
</html>
I hope that's easy to understand.. if not please leave a comment and i will explain it!
Thank you!.
Leave a comment for help !
testing...
ReplyDeleteit was very useful. thanks
ReplyDeleteGreat tut!!!
ReplyDeleteThanks.
Dont you think if you will create zip file.It will be more help ful.simply thought came
ReplyDeletecan i ask a question? coz i'm new in code igniter. how can i add this shoutout in my website? i follow your tutorial and i am completely out of nowhere please help and i can't find in Controller/welcome.php hope you'd answer thank you :)
ReplyDeletei had it working before but now it says it can't establish a connection to localhost when i try to submit a shout
ReplyDeletegkfkgkhfghk
ReplyDeletefgjdgjdfj
Deletenot functioning
ReplyDeletetest
ReplyDeletetest
ReplyDeleteTest
ReplyDelete