Jump to content

EmperorDoom

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

EmperorDoom's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I don't see any reason why your mysql code would mess up the css.. perhaps the problem is in the html or php? If you have any unclosed <table></table> tags that sometimes messes things up. You should post the code for your form especially the bit near the submit button.
  2. Hey everyone, I want to make a calendar where you can click multiple days and have them visually register as clicked sort of like checkboxes.. actually.. i want them to be checkboxes but instead of having that ugly box in there just have the number of the day.. They also have to respond to a form so that when it is submitted i get an array or something of all the dates that were selected.. is this possible? what do I have to do to get rid of those checkboxes? I think I can do it in CSS but there are other checkboxes on the same page that i want to appear.. maybe javascript? Thanks for any help
  3. hey thanks a lot .. that worked.. I hate how simple some of this stuff really is ;P
  4. Hey I don't know what to make of this.. one minute it was working and then it wasn't.. I got this error msg: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''default' WHERE date LIKE '2006-09%'' at line 1 here's a snippet of the code $query="SELECT * FROM '$table' WHERE date LIKE '$date%'"; $result=mysql_query($query) or DIE(mysql_error()); $table is set to 'default' and $date is set to '2006-09' I couldn't find any answers when i searched so I appreciate any help thanks
  5. Hey guys, I need help with this one: I have a form set up with checkboxes. I know how to get an array of the boxes that were checked, but is there anyway to get an array of the boxes that were unchecked? (as in the user clicked them off after they were already checked when the form loaded) Thanks
  6. Thanks! that worked. I now have a second question which is actually more PHP than mysql but any idea how to get an array of checkboxes from a form that were unchecked? not just left unchecked but actually have the check removed before the form submitted?
  7. Hey all, I'm using PHP 5.something and I've dealt with many debugging issues by myself before, but this problem I just don't see the solution. Hopefully you can help. I'm trying to write a variable to a new row in a mysql table only if that variable doesn't already exist. (pretty simplistic) I've written the part that checks an array returned from the table to see if the variable exists, this part works fine :) Now I have an else statement that looks like this else { $doquery = "INSERT into $table(date,Per1,Per2,Per3,Per4,Per5,Per6,Per7,Per8) VALUES($wheredate,0,0,0,0,0,0,0,0)"; $result=mysql_query($doquery) or die("INSERT FAILED"); $updatequery = "UPDATE $table SET Per1=1 WHERE date=$wheredate"; $result = mysql_query($updatequery) or die("UPDATE FAILED"); $centre .= $periodone[$i]." is not in the array with ".$wheredate."|| "; } $periodone is an array with different dates (format yyyy-mm-dd) $wheredate is the current date the program is working with it is set to $year."-".$month."-".$periodone[$i] BTW I know I could do the whole INSERT and UPDATE in one query but i broke it up on purpose. The weird thing is: the output ($centre) displays 24 is not in the array with 2006-08-24 so i know the variable $wheredate is correct but when I check the DB the value in the date field is: "1974" without quotes. where the heck is this number coming from? and what's wrong with my script? Thanks for any input on this. *EDIT* Umm.. i just checked it using a different date, the 11 of august and the value in the date field was 1987 which leads me to believe that the $wheredate is somehow subtracting 08 and 11 from 2006 but why? it's a string right?
×
×
  • 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.