Jump to content

djfox

Members
  • Posts

    327
  • Joined

  • Last visited

    Never

Posts posted by djfox

  1. I`ve already long since got the database stuff, now it`s the code I need. I`ve looked over the code you provided but I am not getting it. I`ve been trying to explain many times that I`m not understanding what it is being said and I`m not seeing how this can be done in one form, and yet the database structure keeps getting brought up, but that isn`t helping me understand how the code is going to get done.

     

    I can`t spend money to have someone else do it, I`m poor, or else I would`ve just hired someone else to do it for me and would`ve skipped all this (I`m not getting paid to have this code done anyhow).

  2. No see, we -want- that history. That`s why I was trying to get this stuff entered into the database in the first place. The thing is to get the pets and services selected and chosen in one form, which will automatically create the history and the invoice would be built from that, rather than making copy A into history and copy B in invoice. What I wanna do is get it all done with just the one form. I can get the pets from the one customer to show up. I can get the list of services to show up. What I can`t do, is get all that to enter into the database with that one click of the submit button.

  3. No offense but if you are doing work for a vet and have no idea what an immuization reminder is, you need to rethink some things.

    Yep, that`s the proper way to help me understand things...

     

    I`m having an extremely difficult time understanding what it is that you guys are trying to tell me to do. All I can get out is that more tables have to be made and the clerk has to fill out multiple forms. That`s all that I`m getting from here.

  4. simply impode the form data using some delimiter. that will create the string you desire.

     

    What? I don`t know what that is or how to do it.

     

    Your client wants to send out immuization reminders.

    Haven`t a clue of what that is either.

     

    IF you had a table that was simply pet id and proceedure id, it would be quit simple and quick to cull all the pets whose immunizations were coming due.

     

    Ok but wouldn`t this still require the clerk to sit there and fill out form after form after form just for one single client to do EACH job for a pet, and then do it all over again for their second pet, etc?

  5. Thorpe actually told you what you needed.  You need to google 'database normalization techniques'.

     

    Why? What do I need it for? What does that do? What kind do I go for?  I`ve searched on this and all I`m finding are sources on books to buy, I can`t find anything online. Now I`m getting frustrated about trying to get this project done and no one here is making any sense or providing anything that is actually being helpful.

  6. @Thorpe: Your post tells me nothing.

     

    @ChemicalBliss:

    Wait wait wait, are you telling me that the best way to do this is to have the clerk go through and do something like:

    Create an invoice

    Select Owner 1

    Select Pet A

    Select Service A

    Create an invoice

    Select Owner 1

    Select Pet A

    Select Service B

    Create an invoice

    Select Owner 1

    Select Pet A

    Select Service C

    Create an invoice

    Select Owner 1

    Select Pet B

    Select Service A

     

    Etc etc etc? That`s ridiculous! Not to mention VERY inefficient for a business! Vet offices and other professional places do not do this.

     

    Second of all, you`re telling me to rebuild my owner and pets tables and rebuild how the owners pets are id`ed to the owner? Why? My system of bringing up the owner`s pets are working just fine.

     

    Unless I have TOTALLY misunderstood everything you`ve written...Which is quite possible.

  7. Ok, this line:

    $sql="UPDATE players SET displayname = '$displayname', campname = '$campname', WHERE id='$id'";

     

    Change it to:

    $sql="UPDATE players SET displayname = '$displayname', campname = '$campname' WHERE id='$id'";

     

    You have an extra comma that shouldn`t be there.

  8. I don`t see anywhere in your code that $displayname $campname and $id are picked up on for the system. You would need to add in

    $displayname = $_GET['displayname'];

    $campname = $_GET['campname'];

    $id = $_GET['id'];

     

    If you`re using post method for the form on the previous page, then replace GET with POST. Without specifying those before you tell the system to add them in, the system won`t know what it`s supposed to grab.

  9. I`m working on this invoice creator for work, and I`m having a bit of trouble for this one function. I have created a checkbox list of services a clerk can check off that the customer wants to have done and another checkbox list of which of their pets is involved (for those who have multiple pets). I have the form to send each checked entry to the next page just fine. However, I want the entries to go into the database in one field. For example, for the checkboxes of the pets, it should list off 23,24,25,26 in a single field "pets", while the services 1,2,3,4 should be in another single field together.

     

    Right now I can only get it to list off each entry of the checkboxes that have been made. But I have no idea how I can get them into the database.

     

    Here is the form invoice_start.php

    <?php
    //Date: June 30 2010
    
    $Title = "Start an Invoice";
    
    require_once "header.php";
    require_once "parsecomment.php";
    session_start();
    
    $id = $_GET['id'];
    
    $res = mysql_query("SELECT id, name, homephone, street, city, state, zip, cellphone, workphone, date FROM customer WHERE id='$id'");
    $rows = mysql_fetch_row($res);
    mysql_free_result($res);
    
    $name = "Start an Invoice for $rows[1]";
    include "box_start.php";
    
    
    echo "Use this form to start an invoice for services for a customer. You will still have to use the register system to add in the costs to the system, but this will track what services were done in the past for a customer, create a record of what critters are currently boarding and will allow to print a nice invoice for customers to take home.";
    echo "<p>";
    echo "<form action='invoice_start2.php' method='post'>";
    echo "<input type='hidden' name='customer' value='$id'>";
    echo "<table border=0 width=100%>";
    echo "<tr>";
    echo "<td valign=top width=50%>";
    echo "<b>Check all pets that apply to this invoice:</b>";
    echo "<br>";
    $query = "SELECT id, name, species
        FROM pets
        WHERE customer='$id' 
        ORDER BY name ASC";
      
      $result = mysql_query($query)or die( mysql_error() . "<HR>".$query);
      
      while($chap = mysql_fetch_row($result)){
        echo "<input type='checkbox' name='POLL[".$chap[0]."]'> $chap[1] <br>";
      }
    echo "<td valign=top width=50%>";
    echo "<b>Check all pets that apply to this invoice:</b>";
    echo "<br>";
    $query2 = "SELECT id, breed, type, cost
        FROM groom_prices 
        ORDER BY type ASC";
      
      $result2 = mysql_query($query2)or die( mysql_error() . "<HR>".$query2);
      
      while($chap2 = mysql_fetch_row($result2)){
        echo "<input type='checkbox' name='COST[".$chap2[0]."]'> <b>$chap2[2]</b> <i>$chap2[1]</i> @ $ $chap2[3]<br>";
      }
    echo "</table>";
    echo "<p>";
    echo "<b>Any Additional Products or Other Purchases, enter the amount (including tax), do NOT enter the $ symbol.</b>";
    echo "<br><input type='text' name='add' size=75 maxlength=100>";
    echo "<p>";
    echo "<b>Any Additional Notes to Be Made in regards to today`s service or any notes to be made to customer:</b>";
    echo "<br><textarea rows=6 cols=60 name='bod'></textarea>";
    echo "<p>";
    echo "<input type='submit' name='submit' value='Start Invoice'>";
    echo "<input type='reset' name='reset' value='Clear Form'>";
    echo "</form>";
    
    
    include "box_end.php";
    ?>
    <p>
    <?php
    include "footer.php";
    ?>

     

    Here is what I have for invoice_start2.php so far (I don`t know how to continue it:

    <?php
    //Date: June 30 2010
    
    $Title = "Start an Invoice";
    
    require_once "header.php";
    require_once "parsecomment.php";
    session_start();
    
    $name = "Start an Invoice";
    include "box_start.php";
    
    
    echo "Use this form to start an invoice for services for a customer. You will still have to use the register system to add in the costs to the system, but this will track what services were done in the past for a customer, create a record of what critters are currently boarding and will allow to print a nice invoice for customers to take home.";
    echo "<p>";
    $id = $_POST['customer'];
    $add = $_POST['add'];
    $bod = $_POST['bod'];
    
    echo "ID: $id <br>Additional: $add <br>Notes: $bod<p>";
    
    foreach($_POST['POLL'] As $PollItem=>$PollValue){
       $poll = $PollItem;
       echo "$poll<br>";
    }
    echo "<p>";
    foreach($_POST['COST'] As $CostItem=>$CostValue){
       $cost = $CostItem;
       echo "$cost<br>";
    }
    echo "<p>";
    echo $_POST['POLL'];
    
    
    
    include "box_end.php";
    ?>
    <p>
    <?php
    include "footer.php";
    ?>

     

    The database I have setup for the invoice, the fields are:

    id (int)

    customer (int)

    date (varchar)

    pets (text)

    services (text)

    additional (int)

    notes (text)

     

    How do I get this entered into the database?

  10. My site allows for registered users to upload images to the site under their own gallery. Currently it just leaves the file named as however the person has it named. But what I would like to do is something another site does, which is rename the files when the user uploads them. An example of how I would like it done:

    A user whose username is "I Like Cheese" uploads a file named "whatever.jpg", but in the uploading form, they title the upload "Dog In the Rain". I`d like like "whatever.jpg" to be renamed to "Dog In the Rain_by_I Like Cheese.jpg" upon the upload process and use that new filename for the database information.

     

    How would I tell the system to rename the image file in that manner?

  11. I`m working on a new category system for the submissions to my website. The new system is broken down into two different database tables. I know the basics of creating a form and have the original drop down selection of the form for the old category system. But for this one, what I want to do is have one select drop down menu with a list (digital, traditional, photography, etc) and depending on what the user selects there, another menu will appear containing the subcategories that belong under the first selection (ie, if they choose digital, they`ll get abstract, wallpaper, fan art, but if they choose photography, they`d get wallpaper, animals, landscape). How can this be done? I`ve looked around online, googling all day but can`t find anything that is like what I`m looking for.

  12. They`re not the kind I had done before, these are wildly different. But if it`s possible to get it to execute a php file, as the link shows, then that will be a better (and much easier) alternative.

  13. My server has suddenly decided to erase all of my cron jobs. I had several but didn`t save any so I have to re-write them all. However, because I`m not an expert with them, I don`t remember how to write them. Can someone give me an example?

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