Jump to content

hcdarkmage

Members
  • Posts

    326
  • Joined

  • Last visited

Posts posted by hcdarkmage

  1. I hate to be the barer of bad news, but it looks like you are going to have to delve into the world of Javascript to get the drop down lists to do your bidding.  I personally do NOT know how to handle your request, but I have seen some people do what you are asking.

     

    If you try to do it with PHP you're going to run into the problem of having to refresh the page and use a submit button with each drop down.  That gets cumbersome and annoying to the end user.  My suggestion is to Google js drop-down changing.

  2. Hi, you are missing the $ infront of your variable j when incrementing it

     

    change:

    for ($j=0; sizeof( $optBox ); j++){
    

     

    to:

     

    for ($j=0; sizeof( $optBox ); $j++){
    

     

    Thanks for catching that.  Usually when I code, I go a bit fast and forget to put in the $ and ; every once in a while.  It bugs the crap out of people when that happens, but it happens.

  3. Here is a question to add to this, or at least a situation that may be familiar.

     

    In this case, you have your site that gathers information from a database (name, address, phone, etc.).  All this information is yours, you are submitting information to different sites that are loaded through the iframe that has forms that require this information, and instead of copy-paste, you want to drag-and-drop this information into the forms.

     

    Or another way would be to have a button that does an auto-fill for these forms.  Remember, the iframe sites are not on the same server, but are apart of an affiliate program or something like that where you can submit your information.

     

    How would you handle crossing information from the main page into the iframe?

  4. Alright....lets try this:

     

    <?php
    
      $nameQry = "SELECT * FROM database";
          $result = mysql_query($nameQry) or die(mysql_error());
    
      $i = 0;  
    
      while($row = mysql_fetch_array($result)){
        $name = $row['name'];
        $email = $row['email'];
        $location = $row['location'];
        $id = $row['id'];
        $optBox[$i] = $row;
        $i++;
      }
    
      if(isset($names)){
         $valueQry = "SELECT * FROM database WHERE id = '$id'";
             $result = mysql_query($valueQry) or die(mysql_error());
    
        while($row = mysql_fetch_array($result)){
            $valID = $row['id'];
            $valName = $row['name'];
            $valEmail = $row['email'];
            $valLocation = $row['location'];
        }
      }
    
    ?>
    

     

    Then in the form area:

     

    
    <form name="form1" method="post">
    <select id="names" name="names">
      <?
         for ($j=0; sizeof( $optBox ); j++){
            echo "<option value='".$optbox[$j]['id']."'>".$optbox[$j]['name']."</option>";
         }
      ?>
    </select>
      Input First Name: <input type="text" name="firstname" value="<? echo $valName ?>" /><br />
      Input Email: <input type="text" name="email" value="<? echo $valEmail ?>" /><br />
      Input Location: <input type="text" name="location" value="<? echo $valLocation?>" /><br />
      Input ID Number: <input type="text" name="id" value="<? echo $valID?>" /><br />
    <input type="submit" name="submit" value="Update Data" />
    </form>
    
    

     

    This code is untested, but in theory should help.

  5. I dont understand that completly, it doesnt update when i changed everything to. I would of thought first i would need a box where i search for name/id number, then if i get a result back it would let me use 4 text boxxes to update the rows i have.

     

    You could do a drop down box that selects all the people in the database and sets the values of the form to auto-populate with the information and you can change and update the information.

     

    
    <?php
    
      $nameQry = "SELECT * FROM database";
          $result = mysql_query($nameQry) or die(mysql_error());
      
      while($row = mysql_fetch_array($result)){
        $name = $row['name'];
        $email = $row['email'];
        $location = $row['location'];
        $id = $row['id'];
      }
    
    ?>
    
    

     

    Then in your form control you have this:

     

    <form name="form1" method="post">
    <select id="names" name="names">
      <option>option values</option>
    </select>
      Input First Name: <input type="text" name="firstname" value="<? echo $name ?>" /><br />
      Input Email: <input type="text" name="email" value="<? echo $email ?>" /><br />
      Input Location: <input type="text" name="location" value="<? echo $location?>" /><br />
      Input ID Number: <input type="text" name="id" value="<? echo $id?>" /><br />
    <input type="submit" name="submit" value="Update Data" />
    </form>
    

     

    or something along those lines.

  6. If you have setup a unique primary key in your database, you could use it for updating the information.

     

    Create the form that has the fields you want to update the database:

    <form name="form1" method="post">
    Input First Name: <input type="text" name="firstname" /><br />
    Input Email: <input type="text" name="email" /><br />
    Input Location: <input type="text" name="location" /><br />
    Input ID Number: <input type="text" name="id" /><br />
    <input type="submit" name="submit" value="Update Data" />
    </form>
    

     

    Of course being a little rusty, in the PHP section of the page you do something like this:

    <?php
      
      foreach($_POST as $key => $value)
          $$key = $value;  //This sets the form field names to values.
    
      mysql_query("UPDATE table SET location = '$location', name = '$firstname', email = '$email' WHERE id = '$id'") or die(mysql_error());
    
    ?>
    

     

    That way you have a clean update of any information that needs to be updated.

     

     

  7. Syncronization is not exactly what I am looking for, though it may help.  I also have Xenu (http://home.snafu.de/tilman/xenulink.html) for looking into broken links, but it doesn't tell me if files, pics, pages, etc. are not being linked to in any way, shape or form.

     

    What a pain!  The web site is running fine, but the excessive files that don't go anywhere are driving me nuts.  It would help to have a program that tells you what files can be deleted without hurting your site.

  8. So is there a program that goes through each song in a directory and erases it's tags?

     

    I had used this http://www.dbpoweramp.com/ when it was free.  Just convert them to mp3, wma or ogg and tell it not to keep the tags.  I believe that ANY program that converts song files can erase the tags.

     

    http://www.avs4you.com/

    http://www.google.com/search?source=ig&hl=en&rlz=&q=music+convert&btnG=Google+Search

     

    Try these.

  9. Here we go with a question that may cause the two word answer "Google it".  The problem is I am not sure which keywords to use.  Does any body know of a program or function that searches your site files (local or other) and tells you what files you have on the site that are not needed (i.e. images, web pages, old style sheets)?

     

    Has anybody run into this type of problem before?

     

    I am cleaning our company's website, but I don't necessarily want to go through EVERY batch of code to see what file are being used, what are missing and what need to be taken off to save space.

     

    And if you are going to be nice and say "Google", then could you at least give me a good keyword (or words) that will point me in the right direction.  I don't want to start a fight.

  10. We have MANY sales reps that speak/write Spanish fluently, but they never have the time to work with me (the good ol' "what's in it for me").  The one person we DO use takes up to a month to translate simple documents (and by then they have been updated or removed).  He is getting paid to do it, but we can't impress enough on the urgency of getting it all translated ASAP.

     

    That is why I asked about the term "reasonable amount of time".  What do you feel is a reasonable turnaround for the translation of a few documents?

  11. You know, some people take the "fun" out of "functional".

     

    Just as the new year started, I was ask...no, wait . . . scratch that . . . told that the Spanish version of the company website HAD to be updated within a reasonable time.  What is considered as a reasonable time?  A week?  A month? A year?

     

    Well, it wouldn't be bad if I could cut out the middle man and translate what needs to be translated without having to go to an outside source (more money in my pocket), but as it is, I don't speak, write or translate Spanish.  At all.

     

    The company is too **insert your choice cussword here** cheep to pay for any training (taught myself PHP, even though they said they would pay for schooling).  Can't complain too much, mostly because I found this forum for help.

     

    There has got to be a way to take a website and have it AUTOMATICALLY translated to another language.  I mean, I don't expect Wikipedia or Google to have private translators sit there and translate EVERY bit of information they have.

     

    Until I find it, I guess I'm stuck doing it the "copy-paste" way.

     

    Does anyone else run into these problems?

  12. Welcome to the "The make fun/puns of other people's usernames thread!"

     

    Here's the game:

    Required:

    1. Make a pun or funny explanation of the username of the person above you.

    2. Keep it funny, not hateful.

    3. Be creative. The sky is the limit.

     

    Optional:

    1. Make more than 1 pun or explanation on people's usernames of the same person, or other people in the thread.

     

    Go!

     

    (Mine name is kind of tough to start out with..oh well :) )

     

    dsaba - how a southerner explains what a sheep says when a child ask "wads dat noise?"  (ds a ba - That's A Baa)

     

    It was bad, but - it was worth a try!

  13. I want to get a DVD player and not sure which one I should get.  any recommendations?

     

    Get a hybrid.  they may be more expensive, but at least you will have a player that will p[lay whatever discs win the HD vs. BluRay war.

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