Jump to content

aebstract

Members
  • Posts

    1,105
  • Joined

  • Last visited

Posts posted by aebstract

  1. I'm not the world's greatest with syntax, but try replacing

     

    echo( 'Name: ' . $row['name'] );
    echo( 'Address: ' . $row['house'] );
    echo( ', ' . $row['street'] );
    echo( ', ' . $row['town'] );
    echo( ', ' . $row['county'] );
    echo( ', ' . $row['country'] );
    echo( ', ' . $row['postcode'] );
    echo( 'Email: ' . $row['email'] );
    echo( 'Phone Number: ' . $row['phone'] );
    echo( 'Mobile Number: ' . $row['mobile'] );
    

     

    with

     

    echo "Name: $row['name']";
    echo "Address: $row['house']";
    echo "$row['street']";
    echo "$row['town']";
    echo "$row['county']";
    echo "$row['country']";
    echo "$row['postcode']";
    echo "Email: ' . $row['email'] );
    echo "Phone Number: ' . $row['phone'] );
    echo "Mobile Number: $row['mobile']";
    

     

    If it works, you can play with it to format it how you want, not sure this is the problem 100% but see if it works.

  2. If you don't need specific help with some sort of issue and just want someone to do this for you, this should be in the freelance section. I'm kinda puzzled as to how people come on here quite frequently, people in school and get an assignment for class but have no clue how to do their assignment? Do you not learn what you're suppose to do?

  3. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC,LOC,PRICE,SPARE)VALUES ('BPRS2-SAF-1000', 'MEYN', 'REHANGER SAFETY ARM STAT' at line 1

     

     

    <?php
    session_start();
    header("Cache-control: private");
    
    if (isset ($_POST['submit'])) {
    $problem = FALSE;
    
    
    include "../connect/todb.php";
    
    
    if (!$problem) {
    
    $pn = $_POST['pn'];
    $mchn = $_POST['mchn'];
    $desc = $_POST['desc'];
    $loc = $_POST['loc'];
    $price = $_POST['price'];
    $spare = $_POST['spare'];
    
    
    
    MYSQL_QUERY("INSERT INTO parts (PN,MCHN,DESC,LOC,PRICE,SPARE)".
    "VALUES ('$pn', '$mchn', '$desc', '$loc', '$price', '$spare')") or die (mysql_error());
    
    
                          header("Location: newparts.php");
    
    } else {
    $content .= "$error";
    }
    }
    ?>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>setup account</title>
    
    </head>
    
    <body>
    
    
    
    
    
    
    
    
    <?php
    $content .= '<form action="newparts.php" method="post">
    <br />
    PN: <br /><input type="text" maxlength="100" class="textfield" name="pn" size="40" value="' . $_POST[pn] . '" /><br /><br />
    MCHN: <br /><input type="text" maxlength="100" class="textfield" name="mchn" size="40" value="' . $_POST[mchn] . '" /><br /><br />
    DESC: <br /><input type="text" maxlength="100" class="textfield" name="desc" size="40" value="' . $_POST[desc] . '" /><br /><br />
    LOC: <br /><input type="text" maxlength="100" class="textfield" name="loc" size="40" value="' . $_POST[loc] . '" /><br /><br />
    PRICE: <br /><input type="text" maxlength="100" class="textfield" name="price" size="40" value="' . $_POST[price] . '" /><br /><br />
    SPARE: <br /><input type="text" maxlength="100" class="textfield" name="spare" size="40" value="' . $_POST[spare] . '" /><br /><br />
    
    
    
    <input type="submit" name="submit" value="submit" class="textfield" /></form>';
    
    
    
    echo "$content";
    ?>
    
    
    
    
    </body>
    </html>
    
    

  4. redarrow.. all you're doing is changing my personal settings that have nothing at all to do with the issue. The value is something I use across many scripts and just don't take out sometimes. It has NOTHING to do with this issue in any way.

  5. Hmm.. I tried to echo it out but I'm just getting that error, don't know how to get around that. I took the mysql error off the end and all it does is reload the page with the values in the form fields.

     

    redarrow: I want it to go back to the same page, so I can keep doing this over and over. There will be hundreds of parts, I don't want to take a lot of time, I would rather go back to my form and keep submitting parts.

     

    I've tried a few different things, changing the query in terms of how I ran it and it seems to get stuck on DESC like the error says, anyone know how to get past that?

  6. Cause this script isn't a public thing, it's just something I'm using to make life easier for myself for a short amount of time while I am doing some data entry. I know what I'm entering. The db is in the same order (not all columns are listed, but it skips through if you don't list, right?)

     

      id 

    PN

    TPN

    MCHN

    DESC

    LOC

    PRICE

    SUB

    SPARE

  7. Well, you have a login script don't you? Do something with the same effect. Run the login credentials first (checking the password to the user in the db) and if it passes, then move on to check the second part (where you match the passwords).

  8. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC,LOC,PRICE,SPARE)VALUES ('BPRS2-INS-1000', 'MEYN', 'INSPECTOR PUSHBUTTON STA' at line 1

     

    
    <?php
    session_start();
    header("Cache-control: private");
    
    if (isset ($_POST['submit'])) {
    $problem = FALSE;
    
    
    if (!$problem) {
    
    $pn  = $_POST['pn'];
    $mchn  = $_POST['mchn'];
    $desc  = $_POST['desc'];
    $loc  = $_POST['loc'];
    $price  = $_POST['price'];
    $spare  = $_POST['spare'];
    
    
    
    $result = MYSQL_QUERY("INSERT INTO parts (PN,MCHN,DESC,LOC,PRICE,SPARE)".
    "VALUES ('$pn', '$mchn', '$desc', '$loc', '$price', '$spare')") or die (mysql_error());
    
    
                          header("Location: newparts.php");
    
    } else {
    $content .= "$error";
    }
    }
    ?>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>setup account</title>
    
    </head>
    
    <body>
    
    
    
    
    
    
    
    
    <?php
    $content .= '<form action="newparts.php" method="post">
    <br />
    PN: <br /><input type="text" maxlength="100" class="textfield" name="pn" size="40" value="' . $_POST[pn] . '" /><br /><br />
    MCHN: <br /><input type="text" maxlength="100" class="textfield" name="mchn" size="40" value="' . $_POST[mchn] . '" /><br /><br />
    DESC: <br /><input type="text" maxlength="100" class="textfield" name="desc" size="40" value="' . $_POST[desc] . '" /><br /><br />
    LOC: <br /><input type="text" maxlength="100" class="textfield" name="loc" size="40" value="' . $_POST[loc] . '" /><br /><br />
    PRICE: <br /><input type="text" maxlength="100" class="textfield" name="price" size="40" value="' . $_POST[price] . '" /><br /><br />
    SPARE: <br /><input type="text" maxlength="100" class="textfield" name="spare" size="40" value="' . $_POST[spare] . '" /><br /><br />
    
    
    
    <input type="submit" name="submit" value="submit" class="textfield" /></form>';
    
    
    
    echo "$content";
    ?>
    
    
    
    
    </body>
    </html>
    
    

  9. Well I actually got what I needed and did state exactly what I was needing, just didn't say what it was for. Anyhow, with this, is there an easy way to make it group in two doubles and do something such as:

    aaaaaa

    aaaabb

    aaaacc

    bbaaaa

    bbaabb

     

    etc, in doubles versus each letter individually? Of course keeping those doubles the same character.

  10. Sounds like a hacking attempt to me.

     

    Actually if you would like to not assume things, I'm gonna make a chart that displays every hex color for web use. Nice assumption though :/

     

     

    edit: this is gonna be a LOT of results :/

  11. I want to write something that will make a 6 digit number/code using a certain amount of characters, both numbers and letters. I want it to try every possible option. Could anyone help lead me in the right way of doing this?

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