www.webdeveloper.com
Results 1 to 4 of 4

Thread: post

  1. #1
    Join Date
    Jun 2011
    Location
    California
    Posts
    383

    post

    what am i do wrong here.. shouldn't i be able to only say "post" once?

    PHP Code:
    if (post(('submit')) & $seconds $seconds);

    $inputname $_POST["how_many"];
    $my_var $inputname $seconds;

    $inputname $_POST["how_many"];
    $my_min $seconds $inputname 60;

    $inputname $_POST["how_many"];
    $my_hours $inputname $seconds 60 60;

    $inputname $_POST["how_many"];
    $my_hours $inputname $seconds 60 60;

    $one_fte $inputname $seconds 60 60 ;
    if (
    $my_hours 8==0);

    $results sql::clean_row("
        select
        sum(quantity) as quantity,
        (sum(duration_minutes) * 60) + sum(duration_seconds) as duration_seconds
    from event.dbo.process_data
    where process_id=
    $process_id");

    $seconds floor($results['duration_seconds'] / $results['quantity']);
    $minutes round($seconds/60 2); 

    HTML Code:
    <div style="border:2px solid #a1a1a1; background:#dde;  -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; /* future proofing */ -khtml-border-radius: 10px; /* for old Konqueror browsers */">
    <table>
    <form name="calc" action="<?php echo matry::here(array('page'=> 'calc')); ?>" method="POST"> 
    <tr><td><?php inp('how_many');?></td><td><div style="position:relative; right: 40px;">Raw Seconds * <?php echo $seconds; ?></div></td></tr>
    <tr><td>This many Seconds: <?php echo $my_var; ?></td></tr> 
    <tr><td>This many Minutes: <?php echo $my_min; ?></td></tr>
    <tr><td>This many Hours: <?php echo $my_hours; ?></td></tr>
    <tr><td>This many FTE: <?php echo ($one_fte/8); ?></td></tr>
    <tr><td><input type="submit" value="Calculate Totals" name="submit" style="border-color: #6699FF; -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
    border-radius: 10px; /* future proofing */
    -khtml-border-radius: 10px; /* for old Konqueror browsers */ " /></td></tr>
    </form> 
    </table></div>
    Last edited by Supplement; 11-08-2012 at 12:58 PM.

  2. #2
    Join Date
    Jun 2011
    Location
    California
    Posts
    383
    I feel it's so redundant.

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,392
    There's no need in the code you posted to assign $_POST['how_many'] to the same variable four times. Once it's assigned, it's assigned (unless you overwrite it at some point). For that matter, there's really no functional need to assign $_POST['how_many'] to anything. These two snippets are functionally identical:
    PHP Code:
    $foo $_POST['foo'];
    $result $foo $bar
    ...or...
    PHP Code:
    $result $_POST['foo'] * $bar
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  4. #4
    Join Date
    Apr 2013
    Location
    Reston
    Posts
    1

    Ref: Post

    You have to check the all code from first. Check event code separately and execute it.
    Thanks
    iConnect Group

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles