Jump to content

Converting ASP pages to PHP


Sagittarius19741

Recommended Posts

Having issues converting pages: code as follows: Not retrieving info from database. Info required from two tables

 

<?php if (isset($_GET['btnSubmit'])) { //Does not display data until button is submitted  

  $query = "SELECT Packlist_Detail.Packlist, Packlist_Detail.Job, job.Unit_Price, Packlist_Detail.Quantity, job.Price_UofM, job.Total_Price," .
" Job.Description, Job.Rev, Job.Customer_PO, Job.Customer_PO_LN, Delivery.Shipped_Date, Job.Part_Number" .
" FROM Packlist_Detail INNER JOIN Job ON Packlist_Detail.Job = Job.Job INNER JOIN Delivery ON Job.Job = Delivery.Job" .
" WHERE(Packlist_Detail.Packlist = '" . $row['packlist'] . "')";
 $results = sqlsrv_query($connPPP, $query);
?>


<?php 
while ($row = sqlsrv_fetch_array($results)) {;?>
<h4><strong>Shipped On:</strong><?php echo $Shipped_Date = $_GET['Shipped_Date'];?></h4> 




<h4><strong>Job:</strong> <a href="/portal/invoicing/jobcostdetail.asp.job=<?php echo $row['job']?>&selecteddate=<?php echo SelectedDate?> . invoice=<?php echo invoice?>" target="_blank" echo $row['job']?></a></h4><br>
<strong>Part Number:</strong> <?php echo $row['Document_Date'];?><br>
<strong>Revision:</strong> <?php echo $row['rev'];("rev")?> <br>
<strong>Quantity Ordered:</strong> <?php echo $row['quantity'];("quantity")?>/<?php echo $row['Price_UofM']?><br>
<strong>Description:</strong> <?php echo $row['description'];("description")?><br>
<strong>P.O.:</strong> <?php echo $row['stomer_PO'];("Customer_PO")?><br>
<strong>P.O. Line:</strong> <?php echo $row['Customer_PO_LN'];("Customer_PO_LN")?><br>
<strong>Unit Price:</strong> $<?php echo $row['Unit_Price'];("Unit_Price")?><br>
<strong>Total:</strong> $<?php echo $row['Total_Pric'];("Total_Price")?>  
     <hr>




<?php ;} //End of button submit ?>


<?php ;} //End of while ?>
Edited by Ingolme
Wrapping code in a code block for readability
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...