User Profile

Collapse

Profile Sidebar

Collapse
jej1216
jej1216
Last Activity: Mar 11 '10, 07:27 PM
Joined: Aug 1 '06
Location: Albuquerque
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • How to autoincrement a filename created with a PHP page

    I have a process in a PHP page that creates a file, and it works fine:
    Code:
    if ("$_REQUEST[severity]" == "Level1-No_Obvious_Harm") {
         $sevvar = "1";
    } elseif ("$_REQUEST[severity]" == "Level2-Non-permanent_Harm") {
         $sevvar = "2";
    } elseif ("$_REQUEST[severity]" == "Level3-Semi-permanent_Harm") {
         $sevvar = "3";
    ...
    See more | Go to post

  • Can JS show the list of choices in drop-down fields?

    Background:
    I have an PHP form that inserts data into a MySQL DB, and it works. [HTML] Severity of Incident:
    <select name="severity" size="1">
    <option value="">Select a Severity Option</option>
    <option value="Level1 - No Obvious Harm">Level 1 - No Obvious Harm</option>
    <option value="Level2 - Non-permanent Harm">Level 2 - Non-permanent...
    See more | Go to post

  • jej1216
    started a topic text data truncates when updating to MtSQL
    in PHP

    text data truncates when updating to MtSQL

    I have a series of scripts that allow the user to a) create new data to insert into a MySQL DB, b) review that data, and c) change that data and do an update to the MySQL DB.

    For a), I use a basic html form, and it passes a sample value like this:
    [[HTML]Severity of Incident:
    <select name="severity" size="1">
    <option value="">Select a Severity Option</option>
    ...
    See more | Go to post
    Last edited by Atli; Sep 5 '08, 12:06 AM. Reason: Fixed the HTML tag

  • jej1216
    replied to How and where to code if/then logic
    in PHP
    Thanks - that is pretty slick code....
    See more | Go to post

    Leave a comment:


  • jej1216
    replied to How and where to code if/then logic
    in PHP
    Thanks - that was it. I had to add an else statement to keep all actuals to show red:
    [code=php]
    while ($myrow = mysql_fetch_arr ay($result))
    {
    if ($myrow["sw_actual"] > $myrow["sw_budget"]) {
    $style1="color: red;"; }
    else {
    $style1="color: black;"; }

    if ($myrow["ben_actual "] > $myrow["ben_budget "])...
    See more | Go to post

    Leave a comment:


  • jej1216
    started a topic How and where to code if/then logic
    in PHP

    How and where to code if/then logic

    I have a PHP page that displays in a table budget vs. actual figures from a MySQL db. I want to add logic where if the actual is greater than the budget, the data is displayed in red, otherwise display in black.
    [code=php]
    ...
    while ($myrow = mysql_fetch_arr ay($result))
    {
    echo "<tr><td>".$myr ow["facility"]."</td>";
    echo "<td align=right>$". number_format($ myrow["sw_actual"],...
    See more | Go to post

  • jej1216
    replied to How to display integer data as currency USD
    in PHP
    Thanks - I stored the raw numbers in MySQL and used the formatting code for PHP, as suggested. Works like a charm.

    Thanks again,

    jej1216
    See more | Go to post

    Leave a comment:


  • jej1216
    replied to How to display integer data as currency USD
    in PHP
    Thanks, all.

    In general, is it better practice to do the formatting in PHP or in MySQL?

    Or does it make any difference?

    It's a small table, so I'm not too concerned with execution time.

    - jej1216
    See more | Go to post

    Leave a comment:


  • jej1216
    started a topic How to display integer data as currency USD
    in PHP

    How to display integer data as currency USD

    Using MySQL to store data that is in integer form. Need to display data as USD (such as $678,321 for the integer value 678321).

    Do I use PHP to do this or straight HTML? I have an HTML Form right now to display the data as it is formatted in MySQL.

    TIA,

    jej1216
    See more | Go to post

  • Tips on creating a Forms Repository system for a company Intranet

    We use Joomla for our company Intranet, and have some external links to pages we built using PHP.

    We need to set up a Forms Repository that will allow users to download PDF forms. At this point they will not have the option of uploading filled out forms - just to download and fill out for mailing purposes.

    Does anyone have any suggestions of what to consider? I am trying to see if Joomla has a download template, but...
    See more | Go to post

  • Thanks - that fixed it.

    I am slowly but surely learning the tricks for these forms!

    Thanks again,

    jej1216...
    See more | Go to post

    Leave a comment:


  • Unable to display data using PHP to populate a text area field

    Using PHP to populate a form, I am not able to display any text area data -- it displays as blank.

    [code=php]
    <?php echo "<textarea rows=11 cols=120 name=inc_descr value='".$incde scr."'></textarea>"; ?>
    [/code]

    The value might be "Patient stumbled on his shoelaces and fell to the floor. Staff were unable to get to the patient to break his fall."
    ...
    See more | Go to post

  • I'm going to start a new post with this issue.

    Thanks,

    jej1216
    See more | Go to post

    Leave a comment:


  • The last piece -- I am not able to display any text area data -- it displays as blank.
    [code-php]
    <?php echo "<textarea rows=11 cols=120 name=inc_descr value='".$incde scr."'></textarea>"; ?>
    [/code]
    The value might be "Patient stumbled on his shoelaces and fell to the floor. Staff were unable to get to the patient to break his fall."

    Using the code above,...
    See more | Go to post

    Leave a comment:


  • That actually fixed both issues - once again, Thanks!

    jej1216...
    See more | Go to post

    Leave a comment:


  • That took care of the blank field.

    The name is one field in the db.

    Thanks,

    jej1216...
    See more | Go to post

    Leave a comment:


  • jej1216
    started a topic Displaying existing data in a text field - 2 issues
    in PHP

    Displaying existing data in a text field - 2 issues

    I am writing a PHP page to open a row of data from a MySQL database so the user can edit the data. This page mimics the inital data entry page. Everything is working so far, with the following two issues.

    In both cases, the display is a text field.
    Problem 1) When the data has spaces ("Barton Fink") and I display it in a textbox, it only shows "Barton." Is there a way to wrap the data so spaces don't signal...
    See more | Go to post

  • jej1216
    replied to How to code <table> arguments within PHP
    in PHP
    I withdraw the question - it works fine. I guess I fat-fingered it before.

    Sorry.
    See more | Go to post

    Leave a comment:


  • jej1216
    replied to How to code <table> arguments within PHP
    in PHP
    I want to make a coding change that will be static - one time. I mainly want to add the border argument so the table has a better appearance....
    See more | Go to post

    Leave a comment:


  • jej1216
    started a topic How to code <table> arguments within PHP
    in PHP

    How to code <table> arguments within PHP

    OK, I'm back again.

    On one of my PHP pages, I build a table using the following code snippet:
    [code=php]
    <?php
    echo "<table><THEAD> <tr>";
    echo "<td><b>Inciden t</b></td>";
    echo "<td><b>Facilit y</b></td>";
    echo "<td><b>Locatio n</b></td>";
    ...
    See more | Go to post
No activity results to display
Show More
Working...