Jump to content

mattichu

Members
  • Posts

    38
  • Joined

  • Last visited

Everything posted by mattichu

  1. so the difference should be 00:00:05
  2. $out2 = 18:56:36 $in2 = 18:56:05
  3. hiii, Im wanting to calculate the time difference between $out2 and $in2 and out put it into a spreadsheet: $m=0; while ($m < $num9) { $fullname=mysql_result($result9,$m,"username"); $date=mysql_result($result9,$m,"date"); $in1=mysql_result($result9,$m,"in1"); $out1=mysql_result($result9,$m,"out1"); $in2=mysql_result($result9,$m,"in2"); $out2=mysql_result($result9,$m,"out2"); $out2f=date("G:i:s",strtotime($out2)); $in2f=date("G:i:s",strtotime($in2)); echo date("D",strtotime($date)). "\t" . $fullname . "\t" . $in1 . "\t". $out1 . "\t" . $in2 . "\t" . $out2 . "\t" . date("G:i:s",strtotime($out2f-$in2f)) . "\t" . "\n"; $m++; } header("Content-disposition: attachment; filename=spreadsheet.xls"); why does this code return 00:00:00 ?
  4. (there are no errors it just doesnt insert into the 2nd table 'members')
  5. any idea why this doesn't work?
  6. that doesnt work, i put it in after just having quotes didnt work to see if it passed the word 'empty' but it didnt
  7. how would I make it so that the option 'Remove (make blank)' would post an empty value?
  8. for some reason my code only posts the first word of the username even tho the last names are in the database. www.checkmyweave.co.uk/new/dropdown.php dropdown.php dropdown2.php
  9. Here is the code ive tried but it doesnt post anything
  10. hi, I'm sruggling to get a drop down list to post the chosen value from an sql database.. could someone please point me in the right direction many thanks!
  11. Hey how would I post the selected value from the following code?
  12. hi I have 2 tables (members & friendship) Members table columns: -------------------------------------------- username | password | email | etc .... -------------------------------------------- Person 1 xxxxxx x@x.com person 2 yyyyyy y@y.com Friendship columns: --------------------------------------- username | friend | status | --------------------------------------- person 1 person 2 friends person 2 person 1 friends person 1 person 3 pending I want to query the friendship table: "SELECT friend FROM friendship WHERE username ='$_SESSION['myusername'];' AND status='friends' " (so its basically getting the user names of anyone who is the logged in users friend) And then use the returned user names to select their data from the members table. Any help much appreciated! ^.^
×
×
  • 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.