note 93731 rejected from control-structures.for by danbrown
| From: | danbrown@php.net | Date: | Thu, 24 Sep 2009 21:34:20 +0000 |
| Subject: | note 93731 rejected from control-structures.for by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-161034@lists.php.net to get a copy of this message | ||
Note Submitter: agrina dot persia at gmail dot com
----
Hi,
Could you let me know, that what is the problem of following script? the $image is not show:
$directory="../$usernameid";
if (!file_exists($directory))
{
mkdir($directory);
}
//DB connection is true, i don't write it here
for ($x=0; $x < mysql_num_rows($result); $x++)
{
$row= mysql_fetch_assoc($result);
$producttitle=$row['es_title'];
$productdescription=$row['es_description'];
$productquantity=$row['es_quantity'];
$productlocation=$row['es_location'];
$productsamples_available=$row['es_samples_available'];
$productshipping_cost=$row['es_shipping_cost'];
$productstatus=$row['es_product_status'];
$productdelivery_time=$row['es_delivery_time'];
$productprice=$row['es_price'];
$productuid=$row['es_id'];
$productref=$row['es_id'];
$es_offer_id=$productref;
// PLEASE ATTENTION ::
// $es_offer_id: load from above 'FOR', and need to use it to following code for image url
of each offer_id from other table in my database:
$resultks=mysql_query("SELECT es_img_url FROM agrina_offer_images where
es_offer_id=$productref",$db);
for ($x=0; $x < mysql_num_rows($resultks); $x++)
{
$image=$row['es_img_url'];
// END ATTENTION
$productpage = fopen("$directory/$productuid.html", "w");
fputs($productpage, "$image");}?>
Everythings is correct expect show the image url.
i tried every way but all was incorrect. please help me with example script.
Thank you,