Hello,
I have a MySQL db were I store articles in.
I have a form to fill these articles, and in that form I can select images who are stored into a directory. Selecting the images works good but the problem is when I want to edit the stored article then the image is not saved and I again have to select it from the selectdropdown box. Basicly I want to match the stored value with the current value in my loop.
Is there a way that the earlier saved image into an article keeps up with the rest from the article but keep it dynamic so if I want to, I still van change the image easy.
My code:
<select name="content_img" id="content_img">
<option value="">
<?php
$dirPath = dir('media/images/content');
$imgArray = array();
while (($file = $dirPath->read()) !== false)
{
if ((substr($file, -3)=="gif") || (substr($file, -3)=="jpg") || (substr($file, -3)=="png"))
{
$imgArray[ ] = trim($file);
}
}
$dirPath->close();
sort($imgArray);
$c = count($imgArray);
for($i=0; $i<$c; $i++) {
$selected = (isset($image) && $image == $imgArray[$i]) ? "selected" : "";
echo "<option value='{$imgArray[$i]}' $selected>{$imgArray[$i]}</option>n";
}
?></option>
</select>
HELP...please
php wont update my db
hello,sorry for posting in mysql forum but i dont know where exactly is the problem but here is the linkhttp://www.phpfreaks.com/forums/index.php/topic,272737.0.htm
This must be easy , pulling the last record of the day, every day, from a txt
I have a txt file logging weather data every minutes (so 1 record per minute). I want to extract the data from the (and only that one) last record for every single day in the log file. Each record as
Polymorphism
Was wondering if someone could explain this a little better to me. I had always assumed that it had to do with method overloading or overriding(through inheritence). The following wikipedia entry
ScriptManager History and Opera Issue
I am having an issue in opera with the ScriptManager. I have a ScriptManager on a page with history enabled. On the same page i have 5 LinkButtons which update Panel content. On the OnClick event of
listing help
Hi,at first, great new design!!! I like it,i got a problem,I want to list some tekst, but there is a users, users can list they own texts, and all teksts, and find words in all texts and in own
php call servlet
I have done a php backup application .So there is a form that user pick some files to zip and download.Because of a problem with greek characters I make a servet (java) to create the zip.But I want
Combining refCursors and Summing
Given the following DDL:
generating all possible random letters
hi'how can i randomize the letters a,b,c,d,e all possible ways, and i want to print the resultand unique from each?thanx
Setting/Modify Headers using mail() function
I have a question about setting email headers when using mail() in a php script.When I send an email from an email account set up domain (using, for example, xxx@MyDomain.net) and then view the header
Pass sql into pl/sql and create RMAN duplicate script.
Hi,