Jump to content

freelance84

Members
  • Posts

    975
  • Joined

  • Last visited

Everything posted by freelance84

  1. Ah, genius. Thanks for your help
  2. I thought that might be the logic behind it, but was prepared to set any "delete members" buttons to also remove any info of theirs from other tables. Does this built in function also hide/ keep the rest of the members info somewhere or does it simply remember what ID numbers have been used in the past and not use them again?
  3. Does this behaviour have a specific name? I'd like to understand a bit more about it but not sure what its called and it not covered in my tutorial books
  4. The ID field in my 'members' table seems to remember passed numbers even when a member has been deleted: i.e: There are ten members in my table, all have been added one after the other and their ID's are 1-10 respectively. Then member ID 7 is removed. Why or rather how can I get a new member to take the number 7 slot? At the moment each new member is given the next consecutive number in the ID list and the table even remembers numbers that have been deleted i.e: If the member with ID number 10 got deleted the next ID given would be 11 even though there is no number 10. Does anyone know what this is called or how to work around this?
  5. Another rather odd one: Option 1 <tr><td colspan="2"> <form action="nrt-home-create-add-students.php" method="post"> <input type="hidden" name="c_n" value="$c_n[0]"/> <input type="hidden" name="d_s" value="$row[2]"/> <input type="hidden" name="d_f_1" value="$row[3]"/> <input type="hidden" name="d_f_2" value="$row[4]"/> <input type="hidden" name="d_f_3" value="$row[5]"/> <input type="hidden" name="d_t" value="$row[6]"/> <input type="hidden" name="d_g" value="$row[7]"/> <input type="hidden" name="d_c_f" value="$row[8]"/> <button id="button-submit_4" type="submit">Delete</button></form>$jj) $row[2], $row[3] $row[4] $row[5]</td></tr> Option 2 <tr><td colspan="2"> <form action="nrt-home-create-add-students.php" method="post"> <button id="button-submit_4" type="submit">Delete</button> <input type="hidden" name="c_n" value="$c_n[0]"/> <input type="hidden" name="d_s" value="$row[2]"/> <input type="hidden" name="d_f_1" value="$row[3]"/> <input type="hidden" name="d_f_2" value="$row[4]"/> <input type="hidden" name="d_f_3" value="$row[5]"/> <input type="hidden" name="d_t" value="$row[6]"/> <input type="hidden" name="d_g" value="$row[7]"/> <input type="hidden" name="d_c_f" value="$row[8]"/></form>$jj) $row[2], $row[3] $row[4] $row[5]</td></tr> Both of the above options contain hidden fields, a button and some text in on single table cell. Option 1 has the submit button after the hidden fields. Option 2 has the submit button before the hidden fields. Option 1 produces a table with no space between the submit button and the start of the text IE and Firefox. Option 2 produces the same table with a big space between the submit button and the text (it is also much bigger in IE than in firefox). In this instance there is no problem in placing the hidden fields before the submit button, however I can foresee instances where I may have text before and after the submit button so this may cause a problem. Is there some CSS styling to be done to the hidden fields or is there no way around this and should hidden fields always come before anything else? (NB The attached .CSS has one form section in it telling forms to display inline)
  6. Good afternoon! Where's the sun gone I'm freezing! Is it possible to have a table with rowspan with the text in the rowspan to read vertically (like taking an entire sentence after its been type and rotating it 90ccw)?
  7. Thanks, taking the height off has worked. Bit wierd that
  8. Ok i've now found that when I log out i can simply press back and stilll view the page because it is stored on the clients computer. The actual script doesn't rerun but will still show the page. As soon as the browser tries to re-run the script again it can't as the user has logged out and detroyed the session. I tried adding the nocache/pragma in the headers but this didn't solve anything. I later found that there is very little that can be done to prevent the browser from doing this. One work around is to add javascript to the page (but as i am trying create my site with no javascript). The reason this problem doesn't exist on chrome and ie6 is because these browsers have a built in function which forces the user to reload/refresh a page if there has been and POST to the site. This then obviously makes the browser realise the session has been destroyed. I down loaded firefox 3.6 and found this version has this function also built in. Don't know about safari. But then I'm not a fan of the granny smith world. Hope this helps anyone who comes across the same problem in the future.
  9. That hasn't worked. The button in the page looks like this: <td><button id="button-submit_1" type="submit">login</button></td> After adding the the new line to the css, it looks like: #button-submit_1 { cursor:pointer; width:80px; height: 24px; line-height:24px; margin-right:auto; margin-left:auto; color:#666666; text-align: center; font-size: small; vertical-align: middle; background-color: #CCCCCC; } The 'g' in login on the button touches the bottom of the button and doesn't look very good. I've tried changing loads of settings but i can't get it to lift up.
  10. I've got a button using css: #button-submit_1 { cursor:pointer; width:80px; height: 24px; margin-right:auto; margin-left:auto; color:#666666; text-align: center; font-size: small; vertical-align: middle; background-color: #CCCCCC; } But how do i get the text to be vertically in the middle?
  11. Brilliant, it worked! Thanks again
  12. Ah right ok I'll give it a shot thanks
  13. P.S. This is the stlye the button takes from the .css: #button-submit_2 { cursor:pointer; width:100px; color:#666666; text-align: center; font-size: small; padding: 0px; height: 20px; vertical-align: middle; background-color: #CCCCCC; }
  14. Hmm, I've just got round to trying to get the two buttons on the same line... I changed my code to <tr> <td colspan="2" align="center" nowrap="nowrap"> <button id="button-submit_2" type="submit">Add Name</button></form> <form action="nrt-home-edit&delete.php" method="post"><input type="hidden" name="class_name" value="$class_name[0]"/> <button id="button-submit_2" type="submit">Finish</button></form> </td> </tr> But the two buttons are still refusing to share the same line and the result is two buttons centred in the td but one on top of the other. Does anyone have any ideas?
  15. ooooh yea! Thanks, I completely forgot about that.
  16. Hello, I have a problem with tables cells containing form buttons: <tr> <td colspan="2" align="center"> <button id="button-submit_2" type="submit">Add Name</button>      </form> <form action="nrt-home-edit&delete.php" method="post"> <input type="hidden" name="class_name" value="$class_name[0]"/> <button id="button-submit_2" type="submit">Finish</button></form> </td> </tr> The above code puts the two buttons on their own lines within the table cell. My question is, does anybody know how to keep them on the same line without putting them into their own individual cells?
  17. Do I have to unset() all of the $_POST as well?
  18. $dob = (value taken from database or wehere ever it is stored) for($year = 1909 ; $year < 2010 ; ++$year) { if($year == $dob) { echo <<<_END <option value="$year" selected = 'selected'>$year</option> _END; } else { echo <<<_END <option value="$year">$year</option> _END; } } didn't know you could preselect options from a drop down menu! Awesome!
  19. I'm really not too sure what you after here... user x: D.O.B = 1995 and can be pulled from the members table in MySQL? That can be then displayed anywhere once you've got it into a variable. But then you want the to have a list/menu on the page which when selected the users DOB is highlighted?
  20. Quite new to php my self so don't know off the top of my head how to get the current year, but this will work (i think) from 1909-2010. You'll have to pardon the long winded "echo <<<_END..._END;", i've just got used to using them over the past few weeks: for($year = 1909 ; $year < 2010 ; ++$year) { echo <<<_END <option value="$year">$year</option> _END; }
  21. So if the result from the query = male you want the male radio button checked? 1 = male, AND 0 = female Then you could do: if($gender == 1) { echo <<<_END Male <input type="radio" name="gender" value="Male" checked="checked" /> Female <input type="radio" name="gender" value="Female" /> _END; } elseif($gender == 0) { echo <<<_END Male <input type="radio" name="gender" value="Male" /> Female <input type="radio" name="gender" value="Female" checked="checked" /> _END; }
  22. Try setting the value of the radio button to a variable to recieve data from a form.
  23. And... a slightly more interesting point. The log out works in IE6 & Chrome 4.1 The log out works to an extent (when i press back I can see the content of the page but not send data with form) in: Firefox 3.05 and Safari 4.05 (all of which are running on winXPpro version 5.1)
  24. I've just realised I had a global on this page: if(isset($_POST['class_name'])) { $class_name = get_post('class_name'); global $class_name; } I have now changed this and every occurence of this global to an array: $class_name = array(); if(isset($_POST['class_name'])) { $class_name_get = get_post('class_name'); array_push ($class_name, $class_name_get); } But It still just lets me press back. When I do press back, I can see the contents of the page, a form, but it won't let me send as it says i'm logged out.
×
×
  • 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.