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
https://forums.phpfreaks.com/topic/90983-wont-store-on-db/
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
https://forums.phpfreaks.com/topic/90983-wont-store-on-db/#findComment-466337
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.