Page 2 of 2
Re: Need Help - how to include session data into a form
Posted: Fri Apr 06, 2012 1:01 pm
by Celauran
I don't understand why you'd use different variables.
Code: Select all
$mailContent .= "Product: {$row['product']}\n";
$mailContent .= "Quantity: {$row['quantity']}\n";
etc.
Re: Need Help - how to include session data into a form
Posted: Fri Apr 06, 2012 6:37 pm
by Tokunbo
@Celauran,
Hi,
actually, in my table, I have datas like this:
ColumnName1 ColumnName2 ColumnName3 ColumnName4
data1a data2a data3a data4a
data1b data2b data3b data4b
data1c data2c data3c data4c
From what I had been assisted to do earlier, I can get One Column of data and its contents written to a file through a single variable. I am asking about the other columns and their contents, how to get all the data in one variable and be able to unpack them into rows and columns in a text file.
With the previous, I have something like this:
ColumnName
data1a
data1b
data1c
so If I want to output the 2 columns, it looks like this:
ColumnName
data1a
data1b
data1c
ColumnName
data2a
data2b
data2c
Note, I want to write the cart's content to a file, so it should have a table format(the first one) like the above.
here is my code:
Code: Select all
while ($row = mysql_fetch_array($result))
{
$xProduct = $row['Product'];
$xQuantity = $row['Quantity'];
$xArray[] = $xProduct;
}
foreach($xArray as $key => $value )
{
echo $key. " ". $value. "<br>";
}
regards
Toks
Re: Need Help - how to include session data into a form
Posted: Fri Apr 13, 2012 1:07 am
by deragoku
I'm confused, just a little, because the product definition of the dollar, even if you do not use the code, I suggest $ mail Content is picked as undefined.
Re: Need Help - how to include session data into a form
Posted: Fri Apr 13, 2012 2:00 am
by Tokunbo
@deragoku
deragoku wrote:I'm confused, just a little, because the product definition of the dollar, even if you do not use the code, I suggest $ mail Content is picked as undefined.
are you referring to Celaura's / my code?
Re: Need Help - how to include session data into a form
Posted: Fri Apr 13, 2012 4:26 am
by requinix
Tokunbo wrote:@deragoku
deragoku wrote:I'm confused, just a little, because the product definition of the dollar, even if you do not use the code, I suggest $ mail Content is picked as undefined.
are you referring to Celaura's / my code?
deragoku is a spammer - look at the link in its signature. Just ignore what it says.