Jump to content

ldougherty

Members
  • Posts

    319
  • Joined

  • Last visited

    Never

Posts posted by ldougherty

  1. Another good way to see the error is via a tool such as phpmyadmin.  You can run the query via the GUI and see the error it spits out.

     

    If the query itself works fine in phpmyadmin then it is likely the values are not coming into the script as expected.

  2. That is exactly correct, it should be..

     

    <?php
    $results =  mysql_query("SELECT masterid FROM lockers WHERE lockerno = '01' LIMIT 0, 30");
    while($values = mysql_fetch_array($results)){ //results from mysql are put in an array and each row is looped
         //set $timeout, $dateout and $storetimeout
         $resultsU = mysql_query("UPDATE lockersmaster SET timeout = '$timeout', dateout = '$dateout', storetimeout = '$storetimeout' WHERE id=" . $values['masterid']);
    ?>
    

  3. this should already be configured, how is your form data being sent via GET or POST?

     

    On the line that says <FORM METHOD=??> what is the method?

     

    If it is POST then you should retrieve the value as $_POST['quantity'] or if it is GET then you should retrieve the value as $_GET['quantity']

  4. Try adding this to the top of the script.

     

    ini_set('display_errors', 1);

    error_reporting(E_ALL);

     

    The script not doing anything is likely a PHP error, these lines will display the error if any exists when the script is executed.

     

    I assume you've created the excel.php file as well in the same file path right?

  5. Information in the database does not automatically make it information in a session.  The reason you are able to output the username with $_SESSION['SESS_FIRST_NAME'] is because you must be setting this somewhere in your code first.

     

    To take the image from the database and make it the image for that particular user on the session you would query the database to get the image path and then assign that image path as a session image variable.

     

    Hope that makes sense.

  6. What exactly are you trying to do with the POST variables before sending them off with email?  In the formmail.pl script there is a section which redirects the user on success, you may be able to interpret that into doing what you want.

     

    I'd personally just not use the formmail.pl script because you could then just use php mail() to send mail at any point in your script and use the variables to do whatever else you want too.

  7. Your individual member profiles are module based out of a completely different directory.

     

    for example..

    http://usfthetatau.org/modules/Alumni/Alpha/AndrewOrtoski.htm

     

    These modules load inside of the iframe as this is where they are clicked on and the iframe itself has a specific target for them.

     

    If you can show us the source for the iframe page of alumni so we can see how exactly it loads and calls the particular members we'd be able to give you a better idea of how to call the alumni page and specify a certain user.

  8. After this line:

     

    $count=mysql_num_rows($result);

     

    You should echo the value of $count to see if it is what you expect it to be.

     

    If it is not then you need to go higher in your code and output variables before they are processed to see exactly what is not working.

  9. Found this script online...

     

    http://www.handyphp.com/index.php/PHP-Resources/Handy-PHP-Functions/ordinal_suffix.html

     

    Another good one here..

     

    http://www.talkincode.com/create-ordinal-numbers-with-php-382.html

     

    function getOrdinal($number){
    // get first digit
    $digit = abs($number) % 10;
    $ext = 'th';
    $ext = ((abs($number) %100 < 21 && abs($number) %100 > 4) ? 'th' : (($digit < 4) ? ($digit < 3) ? ($digit < 2) ? ($digit < 1) ? 'th' : 'st' : 'nd' : 'rd' : 'th'));
    return $number.$ext;
    }
    

  10. Maybe there is an issue with the database server connection, ie the database server isn't reliable?

     

    Try changing

    // Table name

     

    mysql_connect ("$host, $username, $password") or die ("cannot connect");

     

    to

     

    mysql_connect ("$host, $username, $password") or die(mysql_error());

     

    This will give you the actual mySQL error.

×
×
  • 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.