Jump to content

denhamd2

Members
  • Posts

    81
  • Joined

  • Last visited

Everything posted by denhamd2

  1. Edit: figured it out just echoed the $value, easy! Only thing is it echos the value of the submit button from the first page, the name of this is monthsubmit, and the value is bookdays... any ideas on not having this stored as a session variable?
  2. great thanks is there any way I can echo all my session variable $value's then on the 2nd page (separated by <br> tags)?
  3. I'm going to have a number of variables coming into the 2nd page, sometimes it might be 2 variables, other times it might be 17 variables, so is there any way I can store all the variables passed as session variables dynamically?
  4. Hi, I'm wondering could you help me... I'm sending a number of variables between 2 pages using the form GET method, and I want to store them in a session. The variables are basically called after dates and they will equal "yes" if the user has selected them. Eg. they might have selected 3 tickboxes in page 1: $07042007 = yes $18042007 = yes $22042007 = yes which get sent to page 2 via the URL is there any way of storing these in session variables of the same names?
  5. ok great thanks seemed to have worked it out
  6. think the problem was it wouldn't work because of the while loop but the solution was to use STR_PAD_LEFT $myday_num = str_pad($day_num, 2, "0", STR_PAD_LEFT);
  7. brilliant thanks! going with obsidian's code is there any way to have the current month selected?
  8. actually figured it out myself, thanks for all your help :)
  9. here is the rest of the code: //sets the first day of the month to 1 $day_num = 1; //count up the days, untill we've done all of them in the month while ( $day_num <= $days_in_month ) { echo "<td>$day_num<br><input name=\"$day_num$month$year\" type=\"checkbox\" value=\"yes\"></td>\n"; $day_num++; $day_count++; //Make sure we start a new row every week if ($day_count > 7) { echo "</tr><tr>"; $day_count = 1; } } //Finaly we finish out the table with some blanks if needed while ( $day_count >1 && $day_count <=7 ) { echo "<td> </td>"; $day_count++; }
  10. heres the part in question: //sets the first day of the month to 1 $day_num = 1; //count up the days, untill we've done all of them in the month while ( $day_num <= $days_in_month ) { echo "<td>$day_num<br><input name=\"$day_num$month$year\" type=\"checkbox\" value=\"yes\"></td>\n"; $day_num++; $day_count++;
  11. both i'm getting the unpected "{" error. I'm putting this in a while loop so thats probably why? is there any simple php function that will format a number as 2 digits?
  12. actually this seems to give a syntax error, any other ways of doing this?
  13. great thanks also finally one last small thing: I have the day stored in a variable $day_num its currently spitting out days 1-9 as "1", "2", etc. is there any way of formatting $day_num to make it 2 digits, ie. "01", "02", etc?
  14. just wondering aswell, I have the month and year stored in a variable $thedate so for example $thedate=042007 is there any way of splitting this up into 2 separate variables, $themonth and $theyear?
  15. great thanks! just wondering aswell, I have the month and year stored in a variable $thedate so for example $thedate=042007 is there any way of splitting this up into 2 separate variables, $themonth and $theyear?
  16. thanks mate please can you help me with my other thread (dropdown menu for months?)
  17. Hi, I'm looking to do a dropdown with the months in the year starting with this month and going on for 12 months, ie. the selected month is April 2007 and the last month is March 2008, does anyone know how to do this using PHP?
  18. thanks, but is it possible to do this purely in PHP with a simple function?
  19. Hi guys, Is it possible to make a calendar in PHP rather than hard-coding it in HTML? For example, I'm looking to make one for June 2007 and on each line I'd like to have the day, the date and then a checkbox containing the date, so for example: <input type="checkbox" name="date" value="01062007" /> Tues. 1st<br> Is it possible to do this dynamically using PHP? Thanks in advance
  20. just everything within the first 7 <tr> tags
  21. Hi, I have some html stored in a variable $myhtml with a <table> with a few rows. There are currently a lot of rows but I basically just want to echo the first 7 rows, i.e. only take up to the 7th occurance of </tr> ... any ideas on how to do this? Many thanks in advance...
  22. thanks, just a couple of problems i'm having though. sometimes instead of "New York" it says "Big Apple" - I would like these links to be included too. Also sometimes the link spans onto separate lines - is there any way to include these links too? Many thanks in advance
×
×
  • 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.