include "admin/connect.php"; $code=$_POST['code']; $randcode=$_POST['randcode']; if(isset($_POST['submit']) && isset($_POST['ID']) && $code == $randcode) { $myname=$_POST['myname']; $story=$_POST['story']; $ID=$_POST['ID']; $addentry="INSERT INTO s_entries (parent, entry, name) values ('$ID', '$story', '$myname')"; mysql_query($addentry) or die("Could not add to story"); $updateposts="UPDATE s_titles set numposts=numposts+1 where ID='$ID'"; mysql_query($updateposts) or die("Could not update posts"); print "Thanks for adding to PADnDs Bard stories, redirecting to story board.. "; } else if(isset($_POST['submit']) && !isset($_POST['ID'])) { print "You must choose a specific story to post to first, Back to main"; } else if($code != $randcode) { print "Your pass code was either not entered at all, or not entered correctly. Hit back to retain your post and try again or go Back to main"; } else { $ID=$_GET['ID']; $d100=rand(1,1000); print "
| ";
print " "; print " |