Jump to content

kvnmck18

Members
  • Posts

    365
  • Joined

  • Last visited

Everything posted by kvnmck18

  1. Yeah, that doesn't work. I wish I could go to php5 but all I've ever done has been 4...I don't want to change everythign...and move away from what I am used to using. :\ Any other ideas?
  2. I said that in the PM but I had a small typo...and that doesn't work. At least when I tried it out with "...php?page=Foam%20Parties&photo=radio452171fd2afcf"...it brings up the thumbs of just the Foam Parties but not the picture with that id, goes to the default value picture.
  3. I over-looked your one example <table><xsl:for-each select="/"><xsl:variable name="value" select="@one"/><tr><td><xsl:value-of select="$value"/></td><td><xsl:value-of select="$value"/></td></tr></xsl:for-each></table> ...this was my fault, I actually want it to be froma list of similiar nodes but different values. (I'm really tired and really annoyed right now... I can't think well)Example:xml:[/code]<whatever><here one="this is the value" /><here one="this is another value" /><here one="dfdjksfjlsdjf" /><here one="this is dsfsdafsdf" /></whatever> so it makes:[code]<table><tr><td>this is the value</td><td>this is another value"</td></tr><tr><td>dfdjksfjlsdjf</td><td>this is dsfsdafsdf</td></tr></table> SOrry again I'm just in a bad mood currently. SO frustrated with everything in my life.
  4. I'm trying to make an image gallery with options...There are thumbails on the side that open up a picture.But I want to have options for the thumbnails: default (all pictures), just "Wedding", just "Karaoke", and just "Other".This involves two params and two templates and I can't get it to work.XSL: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output omit-xml-declaration="yes" /><xsl:param name="photo" select="'123456'"/><xsl:param name="page" select="'Weddings'"/><xsl:template match="/"><div id="content_right"><div id="content_right_title"><div id="titles">Images</div></div><div id="text"><center><xsl:for-each select="//image[@cat=$page]"><a href="?photo={@id}"><img src="{@thumb}" id="imgthumbs"/></a></xsl:for-each></center></div></div><xsl:apply-templates select="//image[@id=$photo]"/></xsl:template><xsl:template match="//image"><div id="content_left"><div id="content_left_title_green"><div id="titles" class="top_title"> <xsl:value-of select="@cat"/> </div></div><div id="text"> <center><img src="{@src}" alt="{@title}" id="imgshow"/></center></div></div></xsl:template></xsl:stylesheet> PHP: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>RadioActive Productions</title><link rel="stylesheet" type="text/css" href="stylz.css" /><script src="ra.js" type="text/javascript"></script></head><body><div id="header_holder"><div id="header"><script type="text/javascript">Menu();</script></div></div><div id="holder"><div id="content_holder"><?php$xmlfile = "xml.xml";$xslfile = "xsl.xsl";if ($_GET['page']) {$expression= array("page" => $_GET['page']);} if ($_GET['photo']) {$expression= array("photo" => $_GET['photo']);} else {$expression=NULL;}$args = $expression;$engine = xslt_create();$output = xslt_process($engine, $xmlfile, $xslfile, NULL, NULL, $args);print $output;xslt_free($engine);?></div><div id="border_bottom"><img src="images/cord_border_right_corner.gif" id="border_bottom_corner"/><img src="images/left_cord_rip.gif" class="border_bottom_left" /></div></div></body></html> XML sample: <images><image cat="Weddings/Karaoke/Other" src="image.jpg" thumb="image_thumb.jpg" id="123456" /></images> The thumbnails work when clicked it opens the right picture I just can't get the "?page=" to work, it's just "stuck" on the Weddings thumbnails.
  5. That's all brilliant. Listen to this... I'm not one bit, there was no problem at all. It was a simple CSS typo, haha. But I need to add your last comments to my favorites. You need to write a book, a) you know everything you explain it clearlyThanks bud.
  6. kvnmck18

    convert xml

    Are you trying to make an XML of U.S Constitution. haha
  7. When using the following code... ...Is there anyway so when the XML/XSL are put together to make them exported in xhtml?As of right now it comes up as this: <?xml version="1.0" encoding="UTF-8"?> then it goes to the html. I used css and I have "margin:0 auto" (because I want it to be centered) and it is not working it's like its "margin:0"Is there anyway so when they are put together to have it encoded as: <html xmlns="http://www.w3.org/1999/xhtml"> ?Or some other way to have my css work compatiably with XSL to center the div?---------------------And to another subject how can you get a table to be 2 columns when using xslt?I only know how to do this when there is more data being added:<table><xsl:for-each select="//whatever"><tr><td><xsl:value-of select="one"/></td><td><xsl:value-of select="two"/></td></tr></xsl:for-each></table> But I really want it to be more like this: <table><xsl:for-each select="//whatever"><tr><td><xsl:value-of select="one"/></td><td><xsl:value-of select="one"/></td></tr></xsl:for-each></table> Is that clear what I'm trying to say? Like have the xsl "expand" the xml data down and one cell over to the right.
  8. How do you "lock" and input field in a form? So it can't be edited, but you can see the intial/default value.
  9. <?php$mymail = 'me@myemaildomain.com';$cc .= $_POST['subject'];$BoDy = ' ';$BoDy = ' ';$FrOm = 'FROM:' .$_POST['1'];$FrOm .= '<';$FrOm .= $_POST['3'];$FrOm .= '>';$BoDy .= 'Name: ';$BoDy .= $_POST['1'];$BoDy .= "\n";$BoDy .= 'Email: ';$BoDy .= $_POST['2'];$BoDy .= "\n";$BoDy .= 'Send to Alternative Person, Name: ';$BoDy .= $_POST['3'];$BoDy .= "\n";$BoDy .= 'Alternative Email: ';$BoDy .= $_POST['4'];$BoDy .= "\n";$BoDy .= 'Subject: ';$BoDy .= $_POST['subject'];$BoDy .= "\n";$BoDy .= 'Comment: ';$BoDy .= $_POST['comment'];$BoDy .= "\n";$send = mail("$mymail", "$cc", "$BoDy", "$FrOm");if($send){echo '<html><head>';echo '<meta http-equiv="refresh" content="0;URL=http://www.myfunkysite.com/">';echo '</head><body>Random text...';echo '</body></html>';}?> This won't work: <?php$mymail = 'email@yahoo.com';$mymail .= $_POST['3'];$cc .= $_POST['subject'];$BoDy = ' ';$BoDy = ' ';$FrOm = 'FROM:' .$_POST['1'];$FrOm .= '<';$FrOm .= $_POST['2'];$FrOm .= '>';$BoDy .= 'Name: ';$BoDy .= $_POST['1'];$BoDy .= "\n";$BoDy .= 'Email: ';$BoDy .= $_POST['2'];$BoDy .= "\n";$BoDy .= 'Send to Alternative Person, Name: ';$BoDy .= $_POST['3'];$BoDy .= "\n";$BoDy .= 'Alternative Email: ';$BoDy .= $_POST['4'];$BoDy .= "\n";$BoDy .= 'Subject: ';$BoDy .= $_POST['subject'];$BoDy .= "\n";$BoDy .= 'Comment: ';$BoDy .= $_POST['comment'];$BoDy .= "\n";$send = mail("$mymail", "$cc", "$BoDy", "$FrOm");if($send){echo '<html><head>';echo '<meta http-equiv="refresh" content="0;URL=http://www.microcenter.com/">';echo '</head><body>Random text...';echo '</body></html>';}?>
  10. Here's the code I've been using for my email form: <?php$mymail = 'eeeeeeeeeeeeeeeeeeeeemail@kvn18.com';$cc = 'Subject for the Email';$BoDy = ' ';$BoDy = ' ';$FrOm = 'FROM:' .$_POST['name'];$FrOm .= '<';$FrOm .= $_POST['email'];$FrOm .= '>';$BoDy .= 'Name: ';$BoDy .= $_POST['name'];$BoDy .= "\n";$BoDy .= 'Email: ';$BoDy .= $_POST['email'];$BoDy .= "\n";$BoDy .= 'City: ';$BoDy .= $_POST['city'];$BoDy .= "\n";$BoDy .= 'State: ';$BoDy .= $_POST['state'];$BoDy .= "\n";$BoDy .= 'Zip: ';$BoDy .= $_POST['zip'];$BoDy .= "\n";$send = mail("$mymail", "$cc", "$BoDy", "$FrOm");if($send){echo '<html><head>';echo '<meta http-equiv="refresh" content="0;URL=http://www.myfunkysite.com/">';echo '</head><body>Random text...';echo '</body></html>';}?> It works great, but I've been to do a couple of different things with this form:1) Send it to more than one email address a) Send one to the default email Send it also to a secondary email c) Send it to the email address that was entered from the form2) Sending all the data to added to an XML doc. a)Combining the so far two PHP codes PHPFORM to XML FORM: <?$images = Array();function start_element($parser, $name, $attrs){ global $hmmm; if($name == "whatever"){ array_push($hmmm, $attrs); }}function end_element ($parser, $name){}$imagesXML_string = file_get_contents("xml.xml");$parser = xml_parser_create();xml_set_element_handler($parser, "start_element", "end_element");xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);xml_parse($parser, $imagesXML_string) or die("Error parsing XML document.");print "<br />";if($_POST['action'] == "ins"){ array_push($hmmm, Array( "name" => $_POST['name'], "email" => $_POST['email'], "city" => $_POST['city'], "state" => $_POST['state'], "zip" => $_POST['zip'])); $hmmm_final = $hmmm;}else if($_POST['action'] == "del"){ $hmmm_final = Array(); foreach($hmmm as $whatever){ if($whatever['name'] != $_POST['namr']){ array_push($hmmm_final, $whatever); } }}$write_string = "<hmmm>";foreach($hmmm_final as $whatever){ $write_string .= "<whatever name=\"$whatever[name]\" email=\"$whatever[email]\" city=\"$whatever[city]\" state=\"$whatever[state]\" zip=\"$whatever[zip]\" />";}$write_string .= "</hmmm>";$fp = fopen("xml.xml", "w+");fwrite($fp, $write_string) or die("Error writing to file");fclose($fp);print "New Content Added Successfully";print "<br />";print "<a href=\"index.php\" title=\"return\">Return</a>";?></p> I hope this is all possible.
  11. & = & < = < > = > '= '" = "...with that said... on a form that sumbits through php to XML is it possible to automatically convert the: &, <, >, ', "? Well, I'm sure it's possible... does anyone know how to?<input value="<:3 )~~~ "A 'mouse'", he said." />
  12. Thank you all very helpful.
  13. Wonderful. What don't you know? You aren't human. hahaThank you so much.
  14. That worked~ But, now is it possible to do this but limit the result... so there is no repeat with the position 6, 8, 26?PS- You are by far the best XML expert in the world. Nothing stumps you.YOU ROCK
  15. They all follow that order. I'll give that a try.
  16. I've most of this working now, I just have some questions about settings...Number of fields is equal to...the number of boxes you want, like if you wanted age/Fname/Lname, you would say 3 fields...correct?How do know what "Type" to make each field? There are like 28 options How do you know long to make "Length/Values"? What should I set the "Collation", "Attributes", "Null/Not Null" to? What does "auto_increment" do?I'm still confused...I hope you can help
  17. I had about 500 CDs stolen from my house 2 weeks ago now I am filing a my insurance report...I have to list all the CDs stolen. I have about half of my CDs on my Itunes, to save time I was goign to use the XML of the Itunes Catalogue. I have already started doing this but there is a problem...Pretty much everything is referred to as "key", "string", or "interger"...but when I made my XSL it only selected the values of the first "keys"/ect. is there anyway to get all the "keys" under the selected value of "plist/dict/dict/dict"?Here's my XSL so far: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"><html><body><table><xsl:for-each select="plist/dict/dict/dict"><tr><td><xsl:value-of select="string"/></td></tr></xsl:for-each></table></body></html></xsl:template></xsl:stylesheet> I can't put the XML....it's way to long, if you think you need it I'll post a snipit.I hope you can help, this would save me so much time....I hope I explained this well. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="plist/dict/dict/dict"><html><body><table><xsl:for-each select="/"><tr><td><xsl:value-of select="string"/></td></tr></xsl:for-each></table></body></html></xsl:template></xsl:stylesheet> I've tried this too...I think this is more on the way.Here's the /dict of just one song: <dict> <key>Track ID</key><integer>44</integer> <key>Name</key><string>Agenda Suicide</string> <key>Artist</key><string>The Faint</string> <key>Album</key><string>Danse Macabre</string> <key>Genre</key><string>Alternative & Punk</string> <key>Kind</key><string>AAC audio file</string> <key>Size</key><integer>3850776</integer> <key>Total Time</key><integer>238515</integer> <key>Disc Number</key><integer>1</integer> <key>Disc Count</key><integer>1</integer> <key>Track Number</key><integer>1</integer> <key>Track Count</key><integer>9</integer> <key>Year</key><integer>2001</integer> <key>Date Modified</key><date>2004-11-16T02:06:10Z</date> <key>Date Added</key><date>2004-11-16T02:05:10Z</date> <key>Bit Rate</key><integer>128</integer> <key>Sample Rate</key><integer>44100</integer> <key>Play Count</key><integer>5</integer> <key>Play Date</key><integer>-1102521467</integer> <key>Play Date UTC</key><date>2005-02-28T19:30:29Z</date> <key>Location</key><string>/The%20Faint/Danse%20Macabre/01%20Agenda%20Suicide.m4a/</string> <key>File Folder Count</key><integer>4</integer> <key>Library Folder Count</key><integer>1</integer> </dict> I need the <key>Artist</key><string>The Faint</string><key>Album</key><string>Danse Macabre</string><key>Year</key><integer>2001</integer>....oh and I have thought about attributes to distinguish them...but if you think about it that'd take a year to do (that's 3 times 500 at min)
  18. I have already done that but I get an error...and it is on my host... :\
  19. I can't get this to work... <?php$mysql_host="myserveraddress";$mysql_user="myusername";$mysql_password="*****";$link = mysql_connect("$mysql_host", "$mysql_user", "$mysql_password") or die("Could not connect : " . mysql_error());if (mysql_query("CREATE DATABASE my_base",$link)) { echo "Database created"; }else { echo "Error creating database: " . mysql_error(); }mysql_close($link);?> That should work but I keep getting error saying that my username does not have access. :\
  20. Thank everyone I'm going to get on this. Good explinations.
  21. I know php pretty well, I know XML pretty well and I've never used MySQL...I've always avoided it but I would like to start using it now...I just don't really know how to go about it. Where do I start?I want to create a sign up/login page that goes to an individual page for each member. I don't even know what book to look at or where to go about, anyone want to help me out with some baby steps then lead up to long jumps?Thanks,-Kevin
  22. kvnmck18

    float left

    Another problem I saw when I looked over that...not sure if it's related...but it's still a problem: under "h1" you don't have a value for the padding.
  23. Yeah, that's what I figured...I'm going to try to find a way, I was just hoping someone had a quick fix... if I solve it I'll post it.If any one knows please post it too
  24. I want to start off by saying, yesterday that sucked with this being hacked...I was very sad.But it's back so that's good Now on to my question... Is it possible to do a xsl:sort when you choose a certain order...for example:I have elements that are A,B,C....but I don't want them in normal order and I just don't want them to be descending... I want them to come up A,C,B instead...is that possible?I know these the select/lang/data-type/order/case-order ...but those don't really help for what I want... ?
  25. I made something with XSL and I have CSS in it, it's all good but the height:100% does not work. Height values are screwed up in that. It's not wrong css code, it works perfect in HTML not XSL/XML....hmmmAny ideas?
×
×
  • Create New...