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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Hozzer

  1. Hozzer

    Help..

    Not sure why you'd be trying to accomplish this with mySQL... couldn't you just grab the time from the server serving up the sign up page? Keeping in mind that by default the month January will actually equal 0 instead of 1. I recently built something in ActionScript that captured local machine...
  2. Hozzer

    session timeout then redirect?

    I apologize for the tardy reply to all of the helpful responses to my question. 'tis the season :) I feel I should clarify my particular scecnario, essentially there would be no "loggedIn" session. This particular app will simply run and track interactivity from the user. If for instance there...
  3. Hozzer

    session timeout then redirect?

    I'd like to redirect a page if the session times out, which is the best method to accomplish this? Should it be done in the php.ini or the .htaccess file or using the php header(location) on each page?
  4. Hozzer

    Parse error: parse error, expecting `'(''

    Doh!!! Thanks Geates, I couldn't see it for looking at it :)
  5. Hozzer

    Parse error: parse error, expecting `'(''

    I have an if statement inside a function that is checking to see if a session has been set function addNewUser if (isset($_SESSION['hasrun'])){ do this }else{ do this } The error I get is: Parse error: parse error, expecting `'('' ... on line 143 which is the first line of the if statement...
  6. Hozzer

    Multiplying variables?

    Geates, While I agree, when displaying prices and such it does look better :)
  7. Hozzer

    Multiplying variables?

    Thanks jpadie
  8. Hozzer

    Multiplying variables?

    This might be a bit of a nube question but here goes. I have 2 variables I'm multipying $totalCommission = $numSales * $commissions; This runs in a foreach loop so let's say I have 2 sales at 9.25 which adds up to $18.50, why is the zero stripped off when I output $totalCommission?
  9. Hozzer

    for loop problem

    Sorry Geates, My desired result on page would be 31-5 33-7
  10. Hozzer

    for loop problem

    On page results 31-5 31-7 33-5 33-7
  11. Hozzer

    for loop problem

    If this helps I print_r($promoPk) as well Array ( [0] => 5 [1] => 7 ) Array ( [0] => 31 [1] => 33 )
  12. Hozzer

    for loop problem

    Thanks for your response Geates, I did print_r($promoCode); and here is the result Array ( [0] => 5 [1] => 7 ) The code below gives me the correct data but twice... print_r($promoCode); foreach($promoPk as $promo_Pk){ foreach($promoCode as $promo_Code){ $qVendors = "SELECT...
  13. Hozzer

    for loop problem

    Thanks Vacunita, I've actually mad a little progress with nesting the loops. Insead of running two seperate loops I nested the "query" loop inside the first "$promoPk as $promo_Pk" loop. That being said, I then switch the nested foreach to just a for loop and get this error: Parse error: parse...
  14. Hozzer

    for loop problem

    I actually want to combine the results of two for loops, see below foreach($promoPk as $promo_Pk){ echo $promo_Pk; } foreach ($promoCode as $promo_Code){ $qVendors = "SELECT coName,coType,packType FROM vendors WHERE pk = '$promo_Code'"; $result2 = $database->query($qVendors)...
  15. Hozzer

    for loop problem

    Just another quick question, now that I have the array populated is there a way to loop through another query with the values stored in promoCode?

Part and Inventory Search

Back
Top