Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

linkage through forms #6

Merged
merged 1 commit into from

2 participants

@anvk

No description provided.

@cindyli cindyli merged commit 806f9bb into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 22, 2013
  1. @anvk

    linkage through forms

    anvk authored
This page is out of date. Refresh to see the latest.
Showing with 17 additions and 13 deletions.
  1. +3 −1 add_places.php
  2. +14 −12 random.php
View
4 add_places.php
@@ -47,7 +47,9 @@
<?php if($username == $special_user) { ?>
<li class="divider-vertical"></li>
<li>
- <button type="submit" class="btn" value="submit">Pick a random place from the list</button>
+ <form class="navbar-form" action="random.php" method="post">
+ <button type="submit" class="btn" value="submit">Pick a random place from the list</button>
+ </form>
</li>
<?php } ?>
</ul>
View
26 random.php
@@ -21,16 +21,18 @@
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/styles.css">
-<div class="navbar">
- <div class="navbar-inner">
- <ul class="nav">
- <li>
- <button type="submit" class="btn" value="submit">Go Back</button>
- </li>
- </ul>
+<form action="add_places.php">
+ <div class="navbar">
+ <div class="navbar-inner">
+ <ul class="nav">
+ <li>
+ <button type="submit" class="btn" value="submit">Go Back</button>
+ </li>
+ </ul>
+ </div>
</div>
-</div>
-
-<div class="well alert-success">
- Aha! We are going to <h2><?php echo $place; ?></h2>
-</div>
+
+ <div class="well alert-success">
+ Aha! We are going to <h2><?php echo $place; ?></h2>
+ </div>
+</form>
Something went wrong with that request. Please try again.