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 bkrike 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: Hozzer
  • Content: Threads
  • Order by date
  1. 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?
  2. 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...
  3. 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?
  4. Hozzer

    for loop problem

    I have what looks to be a very simple problem but I can't seem to see the issue $q = "SELECT * FROM subscriptions WHERE userID = '".$_SESSION['userid']."'"; $result = $database->query($q); /* Error occurred, return given name by default */ $num_rows = mysql_numrows($result)...
  5. Hozzer

    Issues with adding a primary key

    Hi I have an existing registration form that won't submit after simply adding a primary key to the table. Shouldn't the column just auto_increment as new registrations come in?
  6. Hozzer

    Delete function doesn't work???

    The session file is an SSI function deleteSubscriptions(){ global $database; $q="DELETE FROM subscriptions WHERE userID = ('".$_SESSION['userid']."' AND promoCode = '".$_GET['pc']."')"; if (!mysql_query($q)) { die('Error: ' . mysql_error($q)); } } Is there anything wrong with the syntax?
  7. Hozzer

    Connectivity issue

    While in dev I just used the generic "root" user with no password. Now that I'm ready to launch I want to switch to a different user or at the very least add a password to the root user. After adding a password to the root user in the DB and editing the wp-config file accordingly the connection...

Part and Inventory Search

Back
Top