Jump to content

presso

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

presso's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. php is not just going to send the email by itself it still needs to be routed through a smtp server on your windows box to do this , something like this would do the trick http://www.softstack.com/advsmtp.html although there are heaps out there to choose from.
  2. I have this snippet of code which is what i am sort of after but after alot of trying different things i have been able to get it do do what i want. Currently this bit of code will return the amount of dirs , files and current size of all files combined that is sent in $path , what i would like to be able to do is the same thing but it also includes all the child dirs and files with the $path dir , could somebody point me in the right direction for this if at all possible. $path="set path here"; $totalsize = 0; $totalcount = 0; $dircount = 0; if ($handle = opendir ($path)) { while (false !== ($file = readdir($handle))) { $nextpath = $path . '/' . $file; if ($file != '.' && $file != '..' && !is_link ($nextpath)) { if (is_dir ($nextpath)) { $dircount++; $result = ($nextpath); $totalsize += $result['size']; $totalcount += $result['count']; $dircount += $result['dircount']; } elseif (is_file ($nextpath)) { $totalsize += filesize ($nextpath); $totalcount++; } } } } closedir ($handle);
  3. any takers at resolving this fustrating issue ??
  4. yes what you are showing is what i am expecting however that does not seem to be the case. this is more like what i am getting. [code]Fred 1/1/01 thread4  Fred  2  2 Fred 1/1/01 thread3  Fred  1  0 Fred 1/1/01 thread2  Fred  5  1 Fred 1/1/01 thread1  John  7  1[/code] The output of thread4 fred 2 2 ect, is fine and what i am expecting , however the first query is outputing the same data. If i swap the querys around the first one displays the output correct and the second one displays the last line of the result 10 times. Can you see what i mean. I find it fustrating. I have tried every combination of moving the curly brackets as i thought they were causing the problem , but it either makes no difference or i get no output at all.
  5. ok the following code works , well works for pulling the info , well at least i think it does. I know my code is a little whacky as has been pointed out but it comes from within another module hence the layout. Anyway the second query's output works perfect and displays as it should but the first query just seems to display the same values for all 10 lines. Is it the way that i have the querys ect set out. Some helpful advice on this would be so welcome as its fustrating the hell out of me. [code]$query = $DB->query("SELECT name, date, regdate FROM users ORDER BY regdate DESC LIMIT 10"); while ($info = $DB->fetch_row($query)){ $name1 = $info['name']; $date1 = $info['date']; $query = $DB->query("SELECT subject, lastposter, views, replies, lastpost FROM thread ORDER BY lastpost DESC LIMIT 10"); while ($info1 = $DB->fetch_row($query)){ $ctoff = "35"; $subject = info1['subject']; $lastposter = info1['lastposter']; $views = info1['views']; $replies = info1['replies']; if (strlen($subject) > $ctoff) { $subject = substr($subject,0,$ctoff); $subject .= "..."; } $content .= " <tr> <td class=\"sidedash\" align=\"left\"  >$name1</td> <td class=\"sidedash\" align=\"right\" >$date1</td> <td class=\"sidedash\" align=\"left\"  >$subject</td> <td class=\"sidedash\" align=\"left\"  >$lastposter</td> <td class=\"sidedash\" align=\"right\"  >$views</td> <td class=\"sidedash\" align=\"right\"  >$replies</td> </tr>"; } }[/code]
  6. lol , yeah i know its out of whack , thats because its comming within a module , i cannot believe though that i missed having the curly bracket in the wrong postion thats all the problem was. I don't need to output it via echo $content; as $content is being passed to output by something else. Thanks for pointing out how stupid i was at not looking at my coding abit better,  :) ;D
  7. i am using the following code , which seems to work fine at pulling the info the problem is that it is only displaying one line of the result , how or what is the best way for it to display all 10 lines of info as per the amount of results the query has returned. [code]$query = $DB->query("SELECT name, date, location FROM table ORDER BY name DESC LIMIT 10"); while ($info = $DB->fetch_row($query)) $id = $info['name']; $date = $info['date']; $loc = $info['location']; { $content .= " <tr> <td width=\"100%\" nowrap=\"nowrap\"  <div class=\"smallfont\" style=\"text-decoration: none;\">$name</a></div></td> <td align=\"right\" nowrap=\"nowrap\"<div class=\"smallfont\"> $date</div></td> <td align=\"right\" nowrap=\"nowrap\"<div class=\"smallfont\"> $location</div></td> </tr>         "; } [/code]
  8. ahhhh , nice and easy , i knew it would be but could not quite figure it out , thanks for that  :)
  9. I am wondering what the best way of pulling the data i need out of one query where i need two different instances of the data. ie [code]$query =  $DB->query("SELECT name, location, date FROM table ORDER BY name DESC LIMIT 10");[/code] now say i am using a query like that , the first output sorts the display by name , but what if i want to just a little further down the page want to display the same info but sorted by location , do i have to do another query or can i just use the first query. If somebody could point out the obvious for me would be great.
  10. Perfect , Thats just what i was after , Many Many thanks  ;D
  11. Hey all , i am doing a little project at the moment and i am just wondering what would be the best way to go about doing the following. I query sql for certain info , the info that returns is say  a block of text, what i am looking at wanting to do is to stop display when it sees a certain tag, ie a block of text and within that text is <!stop> , when it see's that it won't display anything beyond that tag. If somebody could point me in the right direction i would be most grateful.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.