Profile cover photo
Profile photo
Rachel Bolton
47 followers
47 followers
About
Posts

I'm very new to Django and I'm looking for a plugin of some sort that will allow me to use a web form to add information to an established PDF.  I have a PHP solution for this, but don't want to reinvent the wheel if possible.  Ideas?  Thoughts?  Feelings?

Post has attachment

Why, at between 1200px & 1830px does my flexslider 2 rotating banner suddenly get too wide?  Any ideas?

http://198.57.140.44/~aquapick/

I am getting a invalid argument supplied for foreach at the foreach statement.  Anyone have any idea what I did wrong?

$billable_query = "SELECT * FROM contacts AS c INNER JOIN skills as s on c.skill_id = s.skill_id AND s.type = '0' AND c.billable = '0' INNER JOIN lproviders as l on l.lp_id  s.lp_id INNER JOIN providerdispositions as p on p.lp_id = s.lp_id";
$billable_contacts = $db->query($billable_query);
$lp = 1;

foreach ($billable_query as $b) {
   if($b['lp_id'] == $lp) {
      if ($b['timeclass'] = 0) {
         if($b['agent_time'] > $b['threshold']) {
            $lp++;
         }
      } 
   } elseif ($b['lp_id'] == $lp) {
      if ($b['timeclass'] = 1) {
         if($b['total_time'] > $b['threshold']) {
               $lp++;
            }
         }
      }
      echo '<pre>';
         print_r($b);
      echo '</pre>';
   }

Why is this not working?  I'm just missing something.  

<?php

include 'conn.php';
$results = $db->query($query);


// $zip = 1001;
if($_POST['zip']) {
$zip = $_POST['zip'];
$query = "SELECT zipcode, state FROM zipcodes WHERE zipcode='".$zip."'";
$results = $db->query($query);
if($results) {
while ($result = $results->fetch_array()) {
echo "Zip Code in Area! Ask about the weather in ".$result['state'];
}
} else {
echo "No Results!!";
}
}


?>

(here is the form)

<div class="container">
<div id="form">
<table>
<tr>
<td>
ZIP VERIFICATION: 
</td>
<td>
<input type="text" id="zip" name="zip">
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" id="verify" value="Verify">
</td>
</tr>
</table>
</div>
<div id="verified"></div>
<div id="failed"></div>
</div>
<script>
$("#verify").click(function() {
var data = $("#zip").val();
var info = {zip: data};
// alert(data);
$.ajax({
type: "POST",
url: "zip.php",
data: info,
success: function(suc) {
$("#verified").html(suc);
//alert("success");
},
error: function(suc) {
$("#failed").html("FAILED!");
//alert("error");
}
});

});
</script>

I love the smell of database normalization in the morning.  It smells like... victory.

Anyone in SLC, UT who would be willing to be my mentor?

I have a function that I need to edit so that I can ALSO choose a specific skill_id and the agent_time being > 30.   Can anyone help me with the best way to do that?

function billable_calls($array) {
$i = 0;
foreach($array as $a) {
if($a['type'] == 0 && $a['agent_time'] > 60 && $a['billable'] == 0) {
if($a['disposition'] != 2   && $a['disposition'] != 3 && $a['disposition'] != 6 && $a['disposition'] != 18 && $a['disposition'] != 12 && $a['disposition'] != 5) {
$i++;
}
}
}
return $i;
}

I need to pass information from a form into a php statement live to calculate the total price for the sales team at work.  Are there any tutorials/help documents out there for this?  I'd like to send it to a separate window too... is that even possible?
Wait while more posts are being loaded