why when i hit submit nothing happens and i get no errors i been stock on this for a whole two days take a look at http://www.screwcops.com/?id=copstories&copstories=post
<?
// Conver to simple variables
$username = $_POST['username'];
$password = $_POST['password'];
if((!$username) || (!$password)){
echo "Login info invalid! <br />";
;
exit();
}
// check if the user info validates the db
$sql0 = mysql_query("SELECT * FROM author WHERE username='$username' AND password='$password' AND activated='1'");
$login_check = mysql_num_rows($sql0);
if($login_check > 0){
while($row = mysql_fetch_array($sql0)){
foreach( $row AS $key => $val ){
$$key = stripslashes( $val );
}
mysql_query("UPDATE author SET last_login=now() WHERE id='$id'");
?>
<?
// Define post fields into simple variables
$location = $_POST['location'];
$date = $_POST['year'] . $_POST['month'] . $_POST['day'];
$amount = $_POST['amount'];
$title = $_POST['title'];
$shortstory = $_POST['shortstory'];
$fullstory = $_POST['fullstory'];
$location = $_POST['location'];
/* Let's strip some slashes in case the user entered
any escaped characters. */
$location = stripslashes($location);
$date = stripslashes($date);
$amount = stripslashes($amount);
$title = stripslashes($title);
$shortstory = stripslashes($shortstory);
$fullstory = stripslashes($fullstory);
$location = stripslashes($location);
if ($location == "") {
$formErr .= "- Location<br>";
}
if ($title == "") {
$formErr .= "- Title<br>";
}
if ($shortstory == "") {
$formErr .= "- Short Story<br>";
} if ($fullstory == "") {
$formErr .= "- Full Story<br>";
} if ($location == "") {
$formErr .= "- Location<br>";
}
if ($formErr) {
echo (' Sorry, the following fields contained invalid data or were left blank:<br> <style type="text/css">
<!--
.formerrors {
font-family: "Verdana, Arial, Helvetica, sans-serif";
font-size: 13px;
}
-->
</style><span class="formerrors">') . $formErr;
}
echo('</span>');
include ("$siteurl/includes/copstories/post.txt"); // Show the form again!
exit(); // exit the script so that we do not create this account!
echo('</span>');
// Enter info into the Database.
if
{$see = $sql = mysql_query("INSERT INTO stories (id, location, date, amount, title, shortstory, fullstory, location)".
"VALUES ('NULL', '$first', '$location', '$date', '$amount' , '$title', '$shortstory', '$fullstory', '$location')")
or die (mysql_error());
$userid = mysql_insert_id();
// Let's mail the user!
//Change all text below to what YOU want
$subject = "Your $sitename account";
$message = "Dear $first $last,
Thank you for registering at $sitename!
You are one step away from logging in.
To activate your account,
please click here:
$siteurl?id=register®ister=activate&userid=$userid&code=$randomcode
Once you activate your account, you will be able to login
with the following information:
Username: $username
Password: $password
Thanks!
Adam Ziolkowski
";
mail($email, $subject, $message,
//Make sure to alter the from fields
"From: Adam@Fuckcopz.com");
echo 'Your account information has been mailed to your email address!
Please check it and follow the directions!';
} else {
echo 'Your account culd not be created!';
}
?>
<? }
} else {
echo "You could not be logged in! Either the username and password do not match or you have not validated your account!<br />
Please try again!<br />";
include("$siteurl/includes/registartion/login.txt");
}
?>