Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (38 sloc) 1.02 KB
require_once(dirname(__FILE__) . '/functions.php');
$response = processNew();
$results = getAllAsArray();
<h1>Links app</h1>
<?php if(!$response): ?>
<h2>Insert Link:</h2>
<form method="post">
<li><label>Url:<input type="text" name="url" value=""/></label></li>
<li><label>Tags:<input type="text" name="tags" value=""/></label>(comma separated)</li>
<li><input type="submit" value="Create New"></li>
<?php else: ?>
<h2>Link Inserted!</h2>
Your link has been inserted.<br />
<a href="">Insert another.</a>
<?php endif ?>
<h2>Links list:</h2>
<?php foreach($results as $res): ?>
<li><a href="<?php echo $res['url'];?>"><?php echo $res['url'];?></a> - tags: <?php echo implode(', ', $res['tags']);?></li>
<?php endforeach ?>
Jump to Line
Something went wrong with that request. Please try again.