I have got this script that gathers all the data that I need but I need it to send it to excel instead back to the screen in the web browser. How can I do this? Should I use something like:
$csv_output .= "n";
Here is my code:
// Make a MySQL Connection
// Construct our join query
$query = "SELECT sunocoimport.duns_num, custmast.gl_num, custmast.division_num, custmast.customer_num, sunocoimport.summary_date, sunocoimport.cc_fees, custmast.fee_percent, custmast.clear FROM sunocoimport, custmast WHERE sunocoimport.duns_num = custmast.duns_num AND (sunocoimport.cc_fees * custmast.fee_percent / 100) <> 0";
$result = mysql_query($query)or die(mysql_error());
// Print out the contents of each row into a table
while($row = mysql_fetch_array($result)){
echo $row['division_num'].",".$row['customer_num'].",".$row['summary_date'].",".round($row['cc_fees'] * $row['fee_percent'] /100 , 2) .",".$row['clear'].",".$row['gl_num'];
echo "<br />";
}
?>
Thanks for your help!
Chat Box in PHP
I was thinking in doing a Chat Box in PHP. For that I would use a form with two fields, Nick and Message, then I would store the data in a DB and show them.I have already made the code for this. In
Stumped by Third Day of Month problem
I am trying to build an algorithm that will essentially do this: Code: [Select]$this_month = October$third_sunday = CalculateThirdSunday(October)if ( ( TodaysDate before $third_sunday ) | ( TodaysDate
need help to creat database
Hello Team, please guys i am stuck from three days with paypal issue for IPN but no luck yet now i wants to do other method. i have used this form to send info to paypal and everything is working ok
Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...On first.php I have one input field NAME, and on posting the form it moves to "second.php" showing the entered value of input field using $_POST,
How to calculate days from variable date?
This will be easy for one of you gurus. I want to fetch the date from a variable date, for example:Code: <?php$mydate = "";$daysaway = 400;$startdate = "5/5/2005";//I need
Simple email form - Newbie
Hello all,First time poster!I've been asked to create a simple HTML form that submits and sends the information to a particular email.The client is using PHP. Since I have a .NET and C# background,
Will this protect from mysql injection?
I do not want anything like DROP TABLE to work or any type of coding.. Heres my code.. is it secure? if not, please help:Code:
Transferring session variables into MySQL
I am trying to transfer $_SESSION variables into MySQL. However there is an error in my MySQL statements.This is the error that I receive:Unable to execute the query.Error code 1136: Column count
Add weeks in a query?
I have a SQL that summarizes the quantity per week. The weeks that has no value does not exist in the table. How can I add these missing weeks with a 0 value in the SQL. Need this to use Avg and
A problem with my GD class
Hello,I created a nice (and simple for now) GD class.The problem is , it works great on wamp, but not in my hostgator acount ( Linux )i tried it on byethost and it didnt worked as well.I am posting