Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: smashing
  • Order by date
  1. smashing

    How to kill sessions?

    You should use: session_start(); just before you use session_destroy(); Although the name of the function may not sound like it, it is PHP's way of first refering to and reconizing the session you are talking about - then it can be destroyed.
  2. smashing

    Split output into 2 pages

    I'm not sure that this is directly related to PHP, but I'm using PHP for my output here so probably yes. When people successfully sign up for something on my website, I'm echoing 2 things. 1) A table containing the recipet of the information - i.e. re-confirming their deal 2) The fine print -...
  3. smashing

    Detting number of days between 2 dates

    ahh that would make sense now thanks...
  4. smashing

    Detting number of days between 2 dates

    This is weird - Isn't every unix timestamp day exactly 86400 seconds apart? I compare 2 date timestamps, remove the lesser from the larger, divide that number by 86400 (number of seconds in a single day) and that gives me the exact number of days betwenn the two. as in following code...
  5. smashing

    Checking for checked radio buttons

    Thanks that worked!
  6. smashing

    Checking for checked radio buttons

    I know that the following works very well: <script LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> <!-- Hide script from older browsers function validForm(ContactForm) { for(j=0;j< ContactForm.plan_id.length;j++) { el = ContactForm.plan_id[j]; if(el.checked == true){ return true;}} alert("Please...
  7. smashing

    WHERE a='a' OR a='12'

    What's happening now using just the following: AND kids.grade between '1' and '8' is that it'll select grades 11 and 12 as well. This is due to the field being a VARCHAR type. If I change the field type to the INT type all the alphabetical stuff inside are changed to a zero. What would be...
  8. smashing

    WHERE a='a' OR a='12'

    thanks man I'll give it a shot.
  9. smashing

    WHERE a='a' OR a='12'

    Please excuse my ignorance here. I have a column that contains numbers or letters. I'm trying to select something that matches either this or that. For example I'm working with a table containing a list of kids at a school. I want to pull any number between 1 and 12 so in my SELECT query I have...
  10. smashing

    multipart/alternative vs. multipart/mixed

    I'm attaching a PDF document when sending an email message. The first part is plain text (Content-type: text/plain) second part is html and the 3rd part is the attachement. Now if I use multipart/alternative only the HTML is recieved, so I try using multipart/mixed but what happens now is that...
  11. smashing

    Session Basics

    else { echo $_SESSION['site']; exit; } That line for one doesn't make sense to me, because if the condition is true "exit" will then stop the script in its track right there
  12. smashing

    Check if coulumn exists

    Quering a MySQL database with PHP, is it possible to find out if a particular column exists in a table, without outputing an error if in fact there is no column by such name?
  13. smashing

    If select field name is an array- error!

    Well, for the record, I finally got it to work. This is how it should be; var s = document.cart_quantity["id[1]"].selectedIndex; if (s== 0) { alert("Please choose your item color"); Thanks to all
  14. smashing

    If select field name is an array- error!

    I have no choice... like i specified before it's part of a huge OsCommerce site and is very very dificult to change around (I would have to revise the whole system of how OsCommerce reads products in a basket and their attributes - something that is beyond my scope. But if there are no errors...
  15. smashing

    If select field name is an array- error!

    Thanks tsuji Alas its still doing the same. Javascript is not complaining - no errors at all - so it looks like it understands and recognizes my var: var s = document.forms['cart_quantity'].elements['id[1]']; ...and it doesn't complain "s is not an object" anymore But if I try any of these...
  16. smashing

    Emailing a form

    The script would need to be able to read the form and process it. This is usually done in languages such as PHP, VB, Coldfusion and many others, and is beyond Golive's scope. You cannot simply send a form to a email address. This is stated quite clearly in the Adobe Golive manual where forms...
  17. smashing

    If select field name is an array- error!

    ahh i see.. But lee is definitely onto something here , because i tried his example: .elements['id[1]']; instead of .elements['id'[1]]; and Javascript is not throwing any more errors at me anymore. Problem is though, the validation isn't happening at all! Current script: function...
  18. smashing

    If select field name is an array- error!

    Thanks. I have to use them as this is part of a huge OsCommerce-driven site. And you know how tricky it is to tweak around OsCommerce.... I thought Javascript has no problem with those brackets when it comes to checkboxes, why would it go crazy if the field is a select?
  19. smashing

    If select field name is an array- error!

    Thanks cLFlaVA, tried your suggestion but not working for me. Code now reads: function validForm(cart_quantity) { var s = document.forms['cart_quantity'].elements['id'][1]; if (s.options[s.selectedIndex].value == '20') { alert("Please choose your item color"); s.focus(); return false; }...
  20. smashing

    If select field name is an array- error!

    I have a select (drop-down-menu) field in a form , and its name looks like this: <select name="id[1]"> etc. I'm trying to disallow a particular choice (the default one of "please choose" that I gave a value of 20) but I'm getting a Javasaript error: "id.1.value is not an object" The...

Part and Inventory Search

Back
Top