Jump to content

harristweed

Members
  • Posts

    346
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by harristweed

  1. I think the problem is this line in XML.class.php while ($file_content = fread($fp, 4096)) { Best option ditch the class and write a custom parser using php5 and simplexml_load_file Else you could try altering the line to while ($file_content = fread($fp, 10000)) { or/and line 69 $reference[$name][$this->_levelsNumbering[$i][$name]] =$reference[$name][$this->_levelsNumbering[$i][$name]]. $data;
  2. mysql_query("SELECT * FROM tblname ORDER BY Feet1 DESC, Inch1 DESC, Feet2 DESC, Inch2 DESC");
  3. two things...first feed dosn't validate, that will break the parser... http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.newsday.co.tt%2Frss.xml Sorry This feed does not validate. * 'ascii' codec can't decode byte 0x93 in position 1801: ordinal not in range(128) (maybe a high-bit character?) [help] In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendations. * line 38, column 170: description contains bad characters (7 occurrences) [help] ... g to any of the floors in the building. ?Nobody is allowed to go upstair ... ^ * line 67, column 0: Missing atom:link with rel="self" [help] and secondly, why not parse it the easy way... $xml_feed="http://www.newsday.co.tt/rss.xml"; if(!$xml = simplexml_load_file("$xml_feed")){ $message.="Can't connect to feed $xml_feed"; } foreach ($xml->channel->item as $value){ $title=$value->title; $description=$value->description; echo"<p>$title</p>\n"; echo"<p>$description</p>\n"; }
  4. why not just link to the file? or is that too easy?
  5. email attachments are a nightmare! Why not email a download link?
  6. jskywalker got there first.... $string="blaa\tblaa\t12345\tblaa\t*more tabs here*\n"; $length=strlen($string); $string_no_n=substr($string,0,($length-2)); $more_tabs="\t\t\t\n"; $new_string=$string_no_n.$more_tabs;
  7. Kind thought but not necessary. Glad to help.
  8. Sure, would you like me to write the solution on a $100 bill and post it to you?
  9. foreach ($jpg_array as $path) { echo "<a><img src='http://www.website.com/images/" . $path . " '></a>"; }
  10. I can't see where you are using $i in the loop content. Something in the loop must be terminating the for loop. Do you get any error messages? ini_set('error_reporting', E_ALL); ini_set('display_errors', 'On');
  11. Are you sure you are connecting to the database? Do you get any error messages ? ini_set('error_reporting', E_ALL); ini_set('display_errors', 'On');
  12. Possibly... while ($row = mysql_fetch_assoc($result)) { $jpg_array=explode(",",$row['ItemImage']); foreach ($jpg_array as $key => $value) { echo" $key = $value<br />\n";//or whatever you are doing with the results... } }
  13. $Image="1.jpg,2.jpg,3.jpg"; $jpg_array=explode(",",$Image); foreach ($jpg_array as $key => $value) { echo" $key = $value<br />\n"; }
  14. whats in the loop?
  15. <?php header('location: ../index.php'); ?>
  16. http://www.google.co.uk/search?hl=en&source=hp&q=php+image+upload+script&meta=&aq=0&oq=php+image+upload
  17. change line 107 from EOD; to EOD ;
  18. send_mail.php?id='.$id.' email='.$row['email']. perhaps should be: send_mail.php?id='.$id.'&email='.$row['email'].
  19. missed of the braces doh!!! if(!mysql_query($update,$link_id)) { $error=mysql_error(); echo $error; }
  20. where is the update run? mysql_select_db("XXXXX")or die("cannot select DB"); [color=red]"UPDATE qls3_users SET group_id = '9' WHERE $payer_email = 'email'";[/color] <<<< THIS IS THE BIT THAT DONT SEEM TO WORK /* END EDITABLE AREA ------------ */ header("location:undefined"); exit; I can't see that you have even connected to the database! $link_id=mysql_connect("localhost", "XXXXX", "XXXXX")or die("cannot connect"); mysql_select_db("XXXXX")or die("cannot select DB"); $update="UPDATE qls3_users SET group_id = '9' WHERE email = '$payer_email'"; if(!mysql_query($update,$link_id)) $error=mysql_error(); echo $error; // or add to email or wherever you want to show it /* END EDITABLE AREA ------------ */ header("location:undefined"); exit;
  21. Payer email wont ='emal' It might = $payer_email UPDATE qls3_users SET group_id = '9' WHERE email = '$payer_email'
  22. thank you
  23. <?php $date_today=date("l jS M Y"); echo $date_today."<br />\n"; $day_1 = mktime(0, 0, 0, date("m"), date("d")+1, date("Y")); $day1=date("l jS M Y",$day_1); echo $day1."<br />\n"; $day_2 = mktime(0, 0, 0, date("m"), date("d")+2, date("Y")); $day2=date("l jS M Y",$day_2); echo $day2."<br />\n"; echo"....<br />\n"; $day_9 = mktime(0, 0, 0, date("m"), date("d")+9, date("Y")); $day9=date("l jS M Y",$day_9); echo $day9."<br />\n"; ?>
  24. I have a new job which is updating a site which was written using Symfony . I have had a brief look at the documentation for Symfony and I’m wondering if going through the pain barrier of learning all about Symfony is worth the effort. Apart from the nightmare of trying to Symfony get it installed on my system. My question is it worth trying to install, learn Symfony for one not very well paid job?
  25. try converting '<?' to '<?php'
×
×
  • 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.