refiking Posted February 13, 2008 Share Posted February 13, 2008 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"); } Quote Link to comment Share on other sites More sharing options...
schilly Posted February 13, 2008 Share Posted February 13, 2008 Are you getting any kind of error? Echo the sql statement before you do the query to make sure it looks right. change die to die(mysql_error()); to see if you get any mysql error. Quote Link to comment Share on other sites More sharing options...
revraz Posted February 13, 2008 Share Posted February 13, 2008 Kinda hard to say when you don't tell us what the actual problem is. Quote Link to comment Share on other sites More sharing options...
refiking Posted February 13, 2008 Author Share Posted February 13, 2008 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.