Jump to content

pixeltrace

Members
  • Posts

    577
  • Joined

  • Last visited

    Never

Everything posted by pixeltrace

  1. hi, i need help on my array code. what i want is to show 6 results into the the number i indicated but it doesn't seem to work. the result i want is something like this: result 1 result 2 result 3 result 4 result 5 result 6 below is my code: <?php $query = mysql_query("SELECT filename, title FROM jos_phocagallery WHERE published=1 ORDER BY RAND() LIMIT 6") or die(mysql_error());; $row = mysql_fetch_array( $query ); $filename[] = $row["filename"]; $title[] = $row["title"]; ?> <p> <img class="demo-fp-img demo-left" src="/images/phocagallery/thumbs/phoca_thumb_m_<?php echo $filename[0]; ?>" alt="<?php echo $title[0]; ?>" title="<?php echo $title[0]; ?>" border="0" /> <span class="demo-sep"> </span> <img class="demo-fp-img demo-left" src="/images/phocagallery/thumbs/phoca_thumb_m_<?php echo $filename[1]; ?>" alt="<?php echo $title[1]; ?>" title="<?php echo $title[1]; ?>" border="0" /> <span class="demo-sep"> </span> <img class="demo-fp-img demo-left" src="/images/phocagallery/thumbs/phoca_thumb_m_<?php echo $filename[2]; ?>" alt="<?php echo $title[2]; ?>" title="<?php echo $title[2]; ?>" border="0" /> </p> <p> <img class="demo-fp-img demo-left" src="/images/phocagallery/thumbs/phoca_thumb_m_<?php echo $filename[3]; ?>" alt="<?php echo $title[3]; ?>" title="<?php echo $title[3]; ?>" border="0" /><span class="demo-sep"> </span> <img class="demo-fp-img demo-left" src="/images/phocagallery/thumbs/phoca_thumb_m_<?php echo $filename[4]; ?>" alt="<?php echo $title[4]; ?>" title="<?php echo $title[4]; ?>" border="0" /><span class="demo-sep"> </span> <img class="demo-fp-img demo-left" src="/images/phocagallery/thumbs/phoca_thumb_m_<?php echo $filename[5]; ?>" alt="<?php echo $title[5]; ?>" title="<?php echo $title[5]; ?>" border="0" /> </p> hope you could help me with this. thanks!
  2. hi all, i need help. i need to lists down news items from an xml file which will be loaded in a php file. i haven't tried this eversince and i am seeking help on how to do this. hope someone can help me on this. thanks!
  3. Hi, I need help, i need to grab only a certain name from a url using php but i dont have any idea on how to do this. example: http://www.domainname.com/0903/filename.php?id=1 i only need to get "0903" hope you could help me with this. thanks so much!
  4. Hi, i need help. i got this script from this site http://kopicaidej.underground.si/?Kat=1 the script is a printer-friendly/ pdf/ send to a friend code all together my problem now is i cannot make it work i've attached the files for your reference. my test site can be view here http://www.manymoonshop.com/print/test.php what is happening here, whenever i click either the print/ pdf or send its just giving me a blank page. hope you could help me with this. thanks so much! [attachment deleted by admin]
  5. yah, i've read that the self keyword doesnt work on php 4 is there anyone who got a solution for this? because i also tried replacing self:: with $this-> but still it doesnt work and is giving me a different error. hope you could help me with this. thanks!
  6. hi, i need help i used the self function in my php code <?php self::show_prev_next_2($programmes_selected, $month_selected, $year_selected, $Itemid); ?> i tested this in my test server, which is using php 5.0.4 now, when i upload it into the live server which is using php 4.4.7 i am getting undefined class name "self" when i tried changing it to $this->show_prev_next_2($programmes_selected, $month_selected, $year_selected, $Itemid); i got this new error Fatal error: Call to a member function on a non-object in /home/manym4/public_html/sinagtala.net/jm/components/com_events/events.html.php on line 750 hope you could help me with this. thanks!
  7. sorry i havent used string_replace before. can you guide me on how to code it? thanks!
  8. hi, i need help, i have a code that will scrap info from another website and there is a part that i need to replace all <hr> tags with <div style="border-top:dotted 1px #cccccc; padding-bottom:10px"></div> my problem is, all tags with HR are being replaced including HR or HRef becoming <div style="border-top:dotted 1px #cccccc; padding-bottom:10px"></div>ef=domain.com below is my code <?php $url = "http://career.capitaland.com"; $ch = curl_init($url); // initialize curl handle //curl_setopt($ch, CURLOPT_URL, $url); // set url to post to //curl_setopt($ch, CURLOPT_FAILONERROR, 1); // Fail on errors curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // allow redirects curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable curl_setopt($ch, CURLOPT_PORT, 80); //Set the port number curl_setopt($ch, CURLOPT_TIMEOUT, 15); // times out after 15s curl_setopt($ch, CURLOPT_HEADER, false); $document = curl_exec($ch); // $originalString = '<hr>'; $pattern = '<hr>'; $replacement = 'div style="border-top:dotted 1px #cccccc; padding-bottom:10px"></div'; echo preg_replace($pattern, $replacement, $document); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td>test</td> </tr> <tr> <td> <? echo $document; exit; ?> </td> </tr> <tr> <td>test</td> </tr> </table> </body> </html> hope you could help me with this. thanks!
  9. i solve the problem already. thanks! this is the code that i used <? function show_latest_banner() { global $database, $mosConfig_live_site; $query = "SELECT id FROM #__events WHERE state =1 ORDER BY RAND() LIMIT 1"; $database->setQuery($query); $id = $database->loadResult(); $query = "SELECT images FROM #__events WHERE id =$id"; $database->setQuery($query); $image = $database->loadResult(); ?> <a href="index.php?option=com_events&task=event_details&id=<? echo $id ?>&Itemid=78"><img src="<?= $mosConfig_live_site .'/images/events/'.$image ?>" class="thumbimages"></a> <?php } show_latest_banner(); ?>
  10. hi, i need help, i need to display images limit to 1 only at random select. this is the code that i used <? function show_latest_banner() { global $database, $mosConfig_live_site; $query = "SELECT * FROM #__events WHERE state =1 ORDER BY publish_up RAND() LIMIT 1"; $database->setQuery( $query ); $rows = $database->loadObjectList(); ?> <img src="<?= $mosConfig_live_site .'/images/events/'.$rows->images ?>" class="thumbimages"> <br><br> <?php } show_latest_banner(); ?> i am getting an error and i dont know exactly how to fix it. this is the error i am getting Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /var/www/html/spa/modules/mod_events_banner.php on line 120 hope you could help me fix this. thanks!
  11. Hi, i need help and i need to know how am i going to strip of some characters into my database item example my Channel Description here<br /><ul><li>Channel Type: Philippine Channel</li><li>Schedules: <a href="images/schedules/abc.pdf" target="_blank">Latest Schedule</a></li><li>Website: <a href="http://www.abc.com.ph" target="_blank">www.abc.com.ph</a></li></ul> i only want to echo "images/schedules/abc.pdf" how can i strip off the other content? hope you could help me with this. thanks!
  12. Hi, we are doing a site w/o using database for our dynamic pages. what i wanted to happen is i have about us page about.php and inside i will have the following php codes <? include (aboutuscontent.php);?> and this page will contains some variables for the content like <? $content1 ='html content here'; $content2 ='html content here'; $content3 ='html content here'; $content4 ='html content here'; ?> now on my aboutus.php i will have this code <? if $_GET[id] == 1 {echo '$content1'; } ?> my question is for my codes inside aboutuscontent.php how will i be able to instead the html contents into so that i wont need to change the HTML codes (e.g " to ' ' must place \ ... and so on) hope you could help me with this. thanks!
  13. Hi, i am using redhat 7.2 linux and i want to upgrade my mysql-client and mysqllibclient 4 to 5.o.45 my problem is i dun know how to do it since this is the first time that i will be upgrading it. hope you can tell or show me how to do the proper procedure on this. thanks so much!
  14. hi, i need help, i would just like to ask if there is any available free php code as a html layout maker. something similar or close to mailchimp.com thanks!
  15. hi, any1 tried using phpbb3? i tried installing it but i can get thru the installation because its telling me to do some settings on the mbstring.http_input, mbstring.http_output set to pass and mbstring.encoding_translation must be set to 0. and idea where and how to do this? i already went to phpbb support but i cant find the solution thanks!
  16. thanks for all the response! i'll check all those. thanks!
  17. Hi, OT please. is there any php opensource forum with blog available for download and free for personal/commercial use? hope you could help me with this. thanks!
  18. Hi, i need help, i developed a website hosted in a linux platform without smtp or mail application installed to process the php mail. now, my only option is to add a code that will use mail application outside that server. my problem is i dont know the code for that 1. something like smpt server: username: password: ...... mail () hope you could help me with this. thanks!
  19. hi, i need help, currently i have a page that list all thumbnails in row now my boss needs it to be list in columns of 5 but i dont know how to do it correctly. below is my current code if ($images) : $imglist = '<table><tr class="hoverbox"><td style="padding-right:10px">'; foreach ($images as $image) { $imglist .= '<img onmouseover="showtrail(\''.$mosConfig_live_site.'/images/mworld/product/images/'.$image.'\',\'\',\'\',\'0.0000\',\'\',\'1\',200)" width="120" height="85" onmouseout="hidetrail();" src="'.$mosConfig_live_site.'/images/mworld/product/images-small/'.$image.'" />'; } $imglist .= '</td></tr></table>'; else : $imglist = ''; endif; hope you could help me with this. thanks!
  20. thanks! that was a quick one and i didnt notice that.
  21. hi, i need help, i have a code in my form for the date select year currently its only showing 2001-2007, now my boss needs to add 2008 in my current code its only getting date from the current going to the 2001. hope you could help me change my code to get 2008 also. below is my code <select name="yearjoined"> <?php for($i=2001; $i<=date("Y"); $i++){ print '<option value="'.$i.'"'; if($yearText == $i){ print ' selected'; } print '>'.$i.'</option>'; } ?> </select> hope you could help me with this. thanks!
  22. its workng i just removed the group by from the string. thanks!
×
×
  • 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.