Richard Teasdale
asked on
making use of php data
Hi
I have a php query against mysql that returns two fields from a delivery database - print and route.
These I can get to display in a table - per attached code.
However I need to be able to manipulate the data - specifically concatanate the two fields (converting the print to string). This is because there is a delivery note in pdf that is made up of these two fields concatanated. ie 'printroute.pdf'. If I can get this I can print the delivery note simply by calling that order .
Can php do this?
Thanks!
I have a php query against mysql that returns two fields from a delivery database - print and route.
These I can get to display in a table - per attached code.
However I need to be able to manipulate the data - specifically concatanate the two fields (converting the print to string). This is because there is a delivery note in pdf that is made up of these two fields concatanated. ie 'printroute.pdf'. If I can get this I can print the delivery note simply by calling that order .
Can php do this?
Thanks!
<?php
?>
<html>
<head><title>Schedule</title></head>
<body background="cream.jpg">
<link rel="stylesheet" href="schedule.css" type-"text/css">
<?php
$user="clayton";
$host="localhost";
$password="******";
$database = "******";
$cxn = mysqli_connect($host,$user,$password,$database)
or die ("couldn't connect to server");
$query = "SELECT print, route FROM DELARCH WHERE orderno = 742695";
$result = mysqli_query($cxn,$query)
or die ("Couldn't execute query.");
/* Display results in a table */
{
/* Display results */
echo "<table border='1'><thead><tr>";
$finfo = mysqli_fetch_fields($result);
foreach($finfo as $field)
{
echo "<th>".$field->name."</th>";
}
echo "</tr></thead>
<tbody>";
for ($i=0;$i < mysqli_num_rows($result);$i++)
{
echo "<tr>";
$row = mysqli_fetch_row($result);
foreach($row as $value)
{
echo "<td>".$value."</td>";
}
echo "</tr>";
}
echo "</tbody></table>";
}
?>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
IMore than enough to get me there..thanks again!