Jump to content

MikeDXUNL

Members
  • Posts

    151
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

MikeDXUNL's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. I had a question and couldn't really pin-point a forum to put this post in, so I hope this suits my topic. You always hear "Facebook is rolling out a new feature"; most recently "Twitter is rolling out the New Twitter.com" but it only releases to so many people at time. Or friends will get features on Facebook before I do (like I couldn't like threaded comments until about a month after all my other friends could). I was just wondering if anyone knows the actual method or how large sites go about releasing new features to users?
  2. I have 200 products right now, and that would kind of be a waste of data wouldn't it?... That doesn't seem efficient at all.
  3. Alrighty, Say I have a site where there are these fields in the db. TABLE: photo_package FIELDS: product_id, gallery_id, title, productfam I need to, on a page, give every product in the family to display. So say I have. DATA: 1, 4, mac book, 4 2, 4, laptop, 4 3, 3, some book, 4,3 The last one has a productfam of 4 and 3 cause when on the 'Some Book' page, it should show Mac Book and Laptop as part of it's product family. What would be the best way to approach getting these values? Thanks in advance.
  4. You reset the $subject variable. You have $subject = $the_subject delete that line and try again.
  5. Not sure if this helps at all, but you don't need to escape the quotations when using single quotes $theusers .= '<select name="adj[]"><option value="">Please Select</option>'; Also, in your second piece of code, $i has no limit. something like while($i < count($someVAR) add this to your code and tell me what you get print_r($_POST['adj']);
  6. Try putting the $body after: $message = $_POST["message"];
  7. My script runs like this: <?php $parents = 'overview,brands,specs'; $parents = explode(",", $parents); if (file_exists($filename)) { $xml = simplexml_load_file($filename, 'SimpleXMLElement', LIBXML_NOCDATA); } else { exit('Failed to open test.xml.'); } echo '<form name="editXML" method="POST" action="#">'; foreach($parents as $parent) { foreach($xml->$parent->children() as $name => $node) { if(trim($node) == "") { foreach($xml->$parent->$name->children() as $child => $body) { echo '<b>'.$parent.' - '.$name.' - '.$child.'</b><br />'; echo "\n"; echo '<textarea name="'.$parent.'-'.$name.'-'.$child.'" style="width: 500px; height: 200px;">'.trim($body).'</textarea><br /><br />'; echo "\n"; } } else { echo '<b>'.$parent.' - '.$name.'</b><br />'; echo "\n"; echo '<textarea name="'.$parent.'-'.$name.'" style="width: 500px; height: 200px;">'.trim($node).'</textarea><br /><br />'; echo "\n"; } } } echo '<input type="submit" name="editXML" />'; echo '</form>'; ?> The problem lies with: foreach($xml->$parent->children() as $name => $node) { Not every .xml file has "overview, brands, specs" .. in this case, this file is missing "brands" is there a way I can argue if on of the $parents does not exist? Thanks in advance for help.
  8. <config> <overview> <body> Bafferts is the result of four generations of knowledge and refinement by one of the world's foremost gin distillers, the Hayman family, who have been distilling quality gin in the heart of London for over 200 years. The Bafferts recipe has been handed down through the Hayman family since the 1800s. To achieve its refreshing taste we infuse a special blend of botanicals that include orange peel, lemon peel, coriander, and a hint of juniper that compliment each other. The result is a lighter style of gin that is perfect for those who crave a crisp pure taste in a classic martini or gin and tonic. </body> </overview> <brands> <traditional> <body> Infused with a blend of four botanicals, Bafferts Gin offers a refined light taste perfect for use in martinis and other classic cocktails. </body> </traditional> <mint> <body> The refined, light taste of Bafferts Original infused with the flavor of mint. </body> </mint> </brands> <specs> <bottlesize> <ul><li>750mL</li></ul> </bottlesize> <proof> <ul><li>80</li></ul> </proof> <accolades> <ul><li>Something</li></ul> </accolades> <features> <ul><li>Something</li></ul> </features> </specs> </config> That's what the XML looks like... I just want that displayed in a textarea. Seperated by Nodes. In the idea of this image: http://img269.imageshack.us/img269/5046/whatiwant.jpg
  9. Hello, What I am aiming to do, is display an XML file inside a <textarea> using the SimpleXML class. Here's what I have so far, but it isn't giving me anything what I'd like it to: <?php $filename = 'data/brands_bafferts.xml'; // The file test.xml contains an XML document with a root element // and at least an element /[root]/title. if (file_exists($filename)) { $xml = simplexml_load_file($filename, 'SimpleXMLElement', LIBXML_NOCDATA); } else { exit('Failed to open test.xml.'); } echo '<br /><br /><br />'; foreach($xml->children() as $stuff) { echo '<'.$stuff->getName().'> <br />'; echo $stuff.' <br />'; foreach($stuff->children() as $bodies) { echo '< BODY '.$bodies->getName().'> <br />'; echo $bodies.' <br />'; if($bodies->getName() != $stuff->getName()) { echo '</'.$stuff->getName().'> <br />'; } foreach($bodies->children() as $copies) { echo '<'.$copies->getName().'> <br />'; echo $copies.' <br />'; if($copies->getName() != $bodies->getName()) { echo '</'.$bodies->getName().'> <br />'; } } } } ?> Help is appreciated! Thanks in advance!
  10. if ($result3 = mysql_db_query($database, "select * from $table WHERE confirmed = 'Yes'")) { if (mysql_num_rows($result3)) { echo '<font face=tahoma size=3>My Friends</font><br>'; echo '<table align=left width=100%><tr>'; $i = 1; while ($qry = mysql_fetch_array($result2)) { $friend = $qry[username]; $friend2 = strtoupper($friend); echo '<td align=left width=150px><a href=galleries/members/'.$friend2.'><font face=tahoma size=2>'.$friend.'</font></a></td>'; if($i == 4) { echo '</tr><tr>'; $i = 0; // reset counter $i++; } }//end while echo '</tr></table>'; }//end num rows }//end result3 include("footer.php"); try and put $i++ inside if($i == 4)
  11. Well, I am trying to empty the directory before I remove it. <?php $mydir = "../photos/".$newFolder.'/'; $d = dir($mydir); while($entry = $d->read()) { if ($entry!= "." && $entry!= ".." && $entry!="Thumbs.db") { unlink($entry); } } $d->close(); rmdir($mydir); ?> Warning: unlink(header3.jpg) [function.unlink]: No such file or directory in C:\wamp\www\fitchbandadmin\admin\managephotos.php on line 87 Warning: rmdir(../photos/New FOlder/) [function.rmdir]: Directory not empty in C:\wamp\www\fitchbandadmin\admin\managephotos.php on line 91 that is the error that i get help is appreciated. Thanks, Mike
  12. what if something is SSL protected? (i.e. Xbox.com pages)
  13. Well, I know how to manually grab source code and break it apart into stuff I want via Regex. But is there a way to have a script run and grab static information from a site, without you manually having to do it? Thanks in advance for the help. Mike
×
×
  • 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.