Jump to content

Bauer418

Members
  • Posts

    206
  • Joined

  • Last visited

    Never

Posts posted by Bauer418

  1. Made a mistake in what I posted.

     

    This line:

         http.open('get', 'update.php?height=' + height + '&width='+width + '&top='+top + '?&left='+left + '&Div_name='+Div_name + '&Border='+Border + '&Position='+Position + '&Background='+Background + '&Cursor='+Cursor);

     

    Should be this:

         http.open('get', 'update.php?height=' + height + '&width='+width + '&top='+top + '&left='+left + '&Div_name='+Div_name + '&Border='+Border + '&Position='+Position + '&Background='+Background + '&Cursor='+Cursor);

     

    And what does this line in your PHP file do:

    $conn;

     

    Seems useless to me.

  2. Your parameters are added incorrectly.  Multiple parameters in a querystring should be separated with an ampersand (&) not a question mark.  The question mark separates the query string from the page.

     

    This code:

        var http = createRequestObject();
    http.open('get', 'update.php?height=' + height + '?width'+width + '?top'+top + '?left'+left + '?Div_name'+Div_name + '?Border'+Border + '?Position'+Position + '?Background'+Background + '?Cursor'+Cursor);
    http.send(null);

     

    Should be this:

        var http = createRequestObject();
         http.open('get', 'update.php?height=' + height + '&width='+width + '&top='+top + '?&left='+left + '&Div_name='+Div_name + '&Border='+Border + '&Position='+Position + '&Background='+Background + '&Cursor='+Cursor);
         http.send(null);

  3. That'd be ugly.  You could just do

     

    	echo '<tr bgcolor="' . $bg . '">
             <td align="left">' . $row['job_no'] . '
    <td align="left">' . $row['model_no'] . '</td>
            <td align="left">' . $row['firmware'] . '</td>
            <td align="center">' . $row['dr'] . '</td>
            <td align="center">' . $row['ds'] . '</td>
            <td align="center">' . $row['dc'] . '</td>
    
            <td align="left"><b>' . ($row['status'] == 'Complete' ? "link here" : "whatever you want if it isn't complete") . '</b> </td>
    </tr>
    

  4. Well I don't think you even need the hidden field, you could just have "yes" hardcoded into the script, but if you want to use it you'll need a form looking like this on your HTML page:

     

    <form action="yourphppage.php" method="post">
    <input type="hidden" name="active" value="yes" />
    <input type="text" name="username" value="" />
    <input type="submit" name="submit" value="Activate!" />
    </form>

     

    And yourphppage.php:

    <?php
    $active = $_POST['active'] == 'yes' ? 'yes' : 'no';
    $username = $_POST['username'];
    $query = "UPDATE `tablename` SET `active`='" . $active . "' WHERE `username`='" . $username . "'";
    $result = mysql_query($query) or die(mysql_error());
    ?>

     

    Please be aware that the code I just wrote is highly vulnerable to SQL injection.  You'll need to run whatever you feel is necessary (usually a mysql_real_escape_string and some HTML removal technique is good enough) to remove that vulnerability.

  5. Well assuming your ID field is an auto_increment, you should just be able to run this query:

     

    SELECT * FROM example ORDER BY id DESC LIMIT 5

     

    Which will grab the 5 most recent items in the database, assuming that is what you want.

  6. You'll want some sort of separation such as placing a hyphen between the manufacturer's 2/3 character code and the model #, so your items would be

     

    HTS-xxxxxx and ST-xxxxxx

     

    Then you can run something like:

    SELECT SUBSTRING_INDEX(model_no, '-', 1) as mft_code FROM Disks

  7. As far as my knowledge is, there is no way to send an email message, to a user, and specify if the account is a POP3 account...POP3 is an internal mail setting by the mail host that allows you access outside of their given mail login area, or they don't give it to you.  You can't just send to POP3 email addresses.

    Yes and no.  POP3 is a client/server protocol for receiving and sending messages to the user's email client.  It's not a "server setting."  However, you refer to an ISP's email service (such as comcast.net) as a POP3 email address, because emails are retrieved using POP3.  This (I believe) is what he meant when saying a POP3 email address.
  8. Do you have access to the vBulletin files from the script you want the information to appear on?  While freenity posted the easiest solution, if you want to do everything with respect to your vBulletin settings, I'd recommend essentially copying and pasting the code from the index.php of vBulletin.  I don't have access to a vBulletin installation, however, but I'm sure a quick google search will shed some light.  I can't imagine you're the first person to want to do this same thing.

  9. Edit: I lied, forgot upload_max_filesize and post_max_size are PHP_INI_PERDIR so they need to be changed in .htaccess, using this:

     

    php_value upload_max_filesize 100M
    php_value post_max_size 101M

    post_max_size is larger than upload_max_filesize to allow 1MB of extra postdata (form fields, etc.) beyond the 100MB limit of the file itself.

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