<?php

$url = $HTTP_POST_VARS['url'];
if ($url != '') {
  echo("<p>Thanks! <a href='http://search.creativecommons.org/'>Back to search.</a>");
  if ($f = fopen("saurls.txt", "a")) {
    fwrite($f, "$url\n");
    fclose($f);
  }
} else {
?>
<p>
<form action="search-add.php" method="post">
Enter a URL to index: <input type="text" name="url">
<input type="submit">
</form>
<?php
}
?>
