note 93731 added to control-structures.for
| From: | agrina dot persia at gmail dot com | Date: | Thu, 24 Sep 2009 20:43:19 +0000 |
| Subject: | note 93731 added to control-structures.for | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-161033@lists.php.net to get a copy of this message | ||
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,
----
Server IP: 79.132.192.3
Probable Submitter: 94.241.131.241
----
Manual Page -- http://www.php.net/manual/en/control-structures.for.php
Edit -- https://master.php.net/note/edit/93731
Del: integrated -- https://master.php.net/note/delete/93731/integrated
Del: useless -- https://master.php.net/note/delete/93731/useless
Del: bad code -- https://master.php.net/note/delete/93731/bad+code
Del: spam -- https://master.php.net/note/delete/93731/spam
Del: non-english -- https://master.php.net/note/delete/93731/non-english
Del: in docs -- https://master.php.net/note/delete/93731/in+docs
Del: other reasons-- https://master.php.net/note/delete/93731
Reject -- https://master.php.net/note/reject/93731
Search -- https://master.php.net/manage/user-notes.php