Jump to content

Won't Store On DB


refiking

Recommended Posts

How can I get this to work correctly?  The only thing I can think of is the date maybe?  Let me know what you think:

 

$now = $_GET['now'];
$slots = $_POST['slots'];
$price = $_POST['price'];
$prize = $_POST['prize'];
$year = $_POST['year'];
$month = $_POST['month'];
$day = $_POST['day'];
$date = $year."-".$month."-".$day;
$rounds = $_POST['rounds'];
$type = $_POST['type'];
$dis = $_POST['dis'];
$deli = $_POST['deli'];
$event = "Test";
IF ($now == "yes"){
$sql = mysql_query("SELECT * FROM Events");
$num = mysql_num_rows($sql);
$id = $num + 1;
$eventid = "t".$id;
IF ($type == "Ranked"){
$fp = "on";
}
IF ($type == "Hardcore Ranked"){
$fp = "off";
}
mysql_query("INSERT INTO Events (event_id,slots,slotsav,event,price,prize,date,rounds,type,fp,dis,deli) VALUES ('$eventid','$slots','$slots','$event','$price','$prize','$date','$rounds','$type','$fp','$dis','$deli')")or die;
header("Location: event.php");
}

Link to comment
Share on other sites

Thanks.  I didn't put one of the fields in correctly.  And Revraz, I thought I did explain what the problem was.  The record wasn't being stored on the DB.  What else would you need to know in the future so I know how to better ask the question.  (I know I can't get the right answer without the right question).  Thanks for helping again!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.