PHP - Php Page Ignoring Css Text Formatting
I have a dynamic menu (jglidemenu) installed on my site. It works fine on my HTML pages but on my PHP pages the font formatting from the menu's style sheet isn't working and I haven't been able to figure out why.
Here's a page where the menu is working correctly: http://www.greenbayeasthighschool.com and here's a page where the formatting fails: http://www.greenbayeasthighschool.com/staff_by_lastname.php This is my first attempt at creating a page with PHP. Is it not possible to use CSS formatting on a page that includes PHP content? Thanks in advance for any help. Similar TutorialsI want a little online users list at the bottom of my page and the color of the username is to match the color defined in the database. but how do i get them to align side by side? if i add them to a <p> they will all appear under neath each other. Heres my current code: $sql=mysql_query("SELECT * FROM ".DB_PREFIX."members WHERE online = 1"); while ($row = mysql_fetch_object($sql)) { echo '<p style="color: #'.$row->username_color.';">'.$row->username.'</p>'; } also i want a comma at the end of each but how do i stop it adding a comma to the end of the last one? Hi there, This doesn't seem to echo as attempted, is their a way of doing this? $body2 = "Hello $name, \n <strong>I want to make this paragraph bold!</strong>\n"; Displays as: Code: [Select] Hello John Smith, <strong>I want to make this paragraph bold!</strong> I want to format the text making it bold, but it displays the <strong> tags. Thanks Hi, In my .htaccess I have used the following code to provide an error page for my site: ErrorDocument 400 /error.php ErrorDocument 401 /error.php ErrorDocument 403 /error.php ErrorDocument 404 /error.php ErrorDocument 500 /error.php If I access a page which doesn't exist at www.example.com/unknownpage.php then the error page will appear formatted correctly with css etc. If I however access an unknown page in a subdirectory e.g. www.example.com/directory/unknownpage.php then the site will appear as text only without any formatting or image. I know this can be resolved by linking the css file via it's full URL (along with all the other media on the error page) is there a better more efficient way? Thanks This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=315372.0 Hi, I have a database table which is full of books e.g book_title, book_author, book_date etc. Im trying to work out a way to list all the authors without duplicating them, if that makes sense. If I do a simple query and then display the book_author in a loop it will show multiple entries for each author. I just want it to display each author once. Hope that makes sense lol sorry Im a newbie. Anyone know how I can do it ? Thanks in advance, Scott. Hi all, I have another uestion. I am currently working with an XML document that has some comments in it that need to stay however it is messing up my parser that I am working on. How can I get around this issue and make the php parser ignore the comments? here is a snippet of the code I am working on. php Code: [Select] //open XML file containing data for current slide $currentslidefilepath = "slides/xml/"; $currentslidefilepath .= $slides[$currentslide]; $currentSlideXml = simplexml_load_file($currentslidefilepath); XML Quote <!-- there are some comments here --> <Basic> <another>some data</another> </Basic> I have any array $DF containing numeric variables, I want the minimum value of the array stored in $val but ignoring any zeros i.e. the lowest number that is not 0. Is this possible? I have a php script. I defined a variable outside of a function, but i cannot echo the variable inside the function. When I execute this: <?PHP $testvar = "test worked!"; testfunction(); function testfunction(){ echo $testvar; } ?> Nothing happens. what am i doing wrong. I did this on my local host. Apache running on Windows Vista Ultimate 32 bit Edition. Thanks in advance. Greetings! I have a CSV file that looks something like this: Quote ,,,,,,,,sdfsdf sdfsdf,,,,,,,,,,,,,,,,,,,,,,sdfsdfsdf:,,,,,,,,2011-04-27,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,dfgdfg,,fgh,,,,,gfh,,,,,,,,,,,,,,fghfgh,,,,,fghf,, fghfh,, fgh,,,,,,fhfgh,,,, Code: [Select] <?php $handle = fopen("csv.csv", "r"); while (($data = fgetcsv($handle, 5000, ",")) !== FALSE) { echo "<pre>"; print_r($data); echo "<pre>"; } ?> Now this prints everything, could someone please provide me with an example of how I can ignore the "empty fields"? Thanks in advance! Basically I have the following code (posted below) foreach($char_xml->characterInfo->characterTab->items->item as $item) { //get the item id $item_id = $item->attributes()->id; //get the xml doc for that item from wow armory $url = "http://www.wowarmory.com/item-info.xml?i=" . $item_id; $data = fetchXML($url); //create a SimpleXML object to parse the xml $item_xml = new SimpleXmlElement($data); //print the item's name echo "<li type=square>" . $item_xml->itemInfo->item->attributes()->name . " "; echo "<b>(" . $item_xml->itemInfo->item->attributes()->level . ")</b></br>"; //calculate gear score total $calc=$calc+$item_xml->itemInfo->item->attributes()->level; } echo '</ul>'; //print the total item level echo '<b>Total Additive Item Score (Equipped):</b>' . $calc; echo '<br>'; //calculate the average item level(equipped) $ilvl=$calc/16; echo '<b>Average Item Score (Equipped):</b>' . round($ilvl) . "<br><br>"; It is working relatively well for what I am trying to accomplish. It pulls xml data from wowarmory and uses it to calculate a player's "average item level". The problem I am running in to is if a player is equipped with certain items (that should not be calculated), the average is incorrect. I know atleast the shirt, tabard and off-hand need to be ignored IF equipped. I am trying to find something relative to all 3 items in the xml data and thus tell the script to disregard them. Here is a printed example of the array I am working with (warning its LONG). This is an example of a player that has these 3 extra items. Shirt (Block 4), off-hand(shield) (Block 17), and Tabard (Block19) : Quote SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=59458 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => inv_gizmo_newgoggles [id] => 59458 [level] => 359 [name] => Energized Bio-Optic Killshades [quality] => 4 [requiredSkill] => Engineering [requiredSkillRank] => 525 [type] => Mail ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 150956 ) ) [disenchantLoot] => SimpleXMLElement Object ( [@attributes] => Array ( [requiredSkillRank] => 500 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [dropRate] => 6 [icon] => inv_misc_crystalepic [id] => 52722 [level] => 85 [maxCount] => 1 [minCount] => 1 [name] => Maelstrom Crystal [quality] => 4 [type] => Enchanting ) ) ) [createdBy] => SimpleXMLElement Object ( [spell] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => trade_engineering [id] => 81720 [name] => Energized Bio-Optic Killshades ) [reagent] => Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 20 [icon] => inv_misc_pyriumbar [id] => 52186 [name] => Elementium Bar [quality] => 1 ) ) [1] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 20 [icon] => inv_stone_15 [id] => 54849 [name] => Obsidium Bar [quality] => 1 ) ) [2] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 2 [icon] => inv_misc_truegold [id] => 58480 [name] => Truegold [quality] => 2 ) ) ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=67130 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [icon] => inv_misc_forestnecklace [id] => 67130 [level] => 359 [name] => Dorian's Lost Necklace [quality] => 4 [type] => Miscellaneous ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 53434 ) ) [disenchantLoot] => SimpleXMLElement Object ( [@attributes] => Array ( [requiredSkillRank] => 500 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [dropRate] => 6 [icon] => inv_misc_crystalepic [id] => 52722 [level] => 85 [maxCount] => 1 [minCount] => 1 [name] => Maelstrom Crystal [quality] => 4 [type] => Enchanting ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=58129 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => inv_shoulder_mail_dungeonmail_c_04 [id] => 58129 [level] => 346 [name] => Seafoam Mantle [quality] => 3 [type] => Mail ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 112607 ) ) [disenchantLoot] => SimpleXMLElement Object ( [@attributes] => Array ( [requiredSkillRank] => 500 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [dropRate] => 6 [icon] => inv_misc_largeshard_superior [id] => 52721 [level] => 85 [maxCount] => 1 [minCount] => 1 [name] => Heavenly Shard [quality] => 3 [type] => Enchanting ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=14617 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => inv_shirt_red_01 [id] => 14617 [level] => 1 [name] => Sawbones Shirt [quality] => 1 [type] => Miscellaneous ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 6250 ) ) [dropCreatures] => SimpleXMLElement Object ( [creature] => SimpleXMLElement Object ( [@attributes] => Array ( [area] => Scholomance [areaUrl] => fl[source]=dungeon&fl[dungeon]=scholomance&fl[boss]=all&fl[difficulty]=all [classification] => 1 [dropRate] => 2 [heroic] => 1 [id] => 11261 [maxLevel] => 42 [minLevel] => 42 [name] => Doctor Theolen Krastinov [title] => The Butcher [type] => Humanoid [url] => fl[source]=dungeon&fl[dungeon]=scholomance&fl[difficulty]=heroic&fl[boss]=11261 ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=56563 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [icon] => inv_chest_raidshaman_i_01 [id] => 56563 [level] => 359 [name] => Twilight Scale Chestguard [quality] => 4 [type] => Mail ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 101750 ) ) [disenchantLoot] => SimpleXMLElement Object ( [@attributes] => Array ( [requiredSkillRank] => 500 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [dropRate] => 6 [icon] => inv_misc_crystalepic [id] => 52722 [level] => 85 [maxCount] => 1 [minCount] => 1 [name] => Maelstrom Crystal [quality] => 4 [type] => Enchanting ) ) ) [createdBy] => SimpleXMLElement Object ( [spell] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => trade_leatherworking [id] => 78489 [name] => Twilight Scale Chestguard ) [reagent] => Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 10 [icon] => item_savageleather [id] => 52976 [name] => Savage Leather [quality] => 1 ) ) [1] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 1 [icon] => inv_misc_rubysanctum2 [id] => 52979 [name] => Blackened Dragonscale [quality] => 1 ) ) [2] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 1 [icon] => inv_misc_pelt_12 [id] => 52980 [name] => Pristine Hide [quality] => 3 ) ) [3] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 1 [icon] => inv_misc_volatilewater [id] => 52326 [name] => Volatile Water [quality] => 1 ) ) [4] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 1 [icon] => inv_misc_volatilefire [id] => 52325 [name] => Volatile Fire [quality] => 1 ) ) [5] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 1 [icon] => inv_misc_volatilelife_green [id] => 52329 [name] => Volatile Life [quality] => 1 ) ) ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=56538 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [icon] => inv_belt_mail_raidshaman_i_01 [id] => 56538 [level] => 359 [name] => Stormleather Sash [quality] => 4 [type] => Mail ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 53729 ) ) [disenchantLoot] => SimpleXMLElement Object ( [@attributes] => Array ( [requiredSkillRank] => 500 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [dropRate] => 6 [icon] => inv_misc_crystalepic [id] => 52722 [level] => 85 [maxCount] => 1 [minCount] => 1 [name] => Maelstrom Crystal [quality] => 4 [type] => Enchanting ) ) ) [createdBy] => SimpleXMLElement Object ( [spell] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => trade_leatherworking [id] => 78462 [name] => Stormleather Sash ) [reagent] => Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 10 [icon] => item_savageleather [id] => 52976 [name] => Savage Leather [quality] => 1 ) ) [1] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 1 [icon] => inv_misc_rubysanctum2 [id] => 52979 [name] => Blackened Dragonscale [quality] => 1 ) ) [2] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 1 [icon] => inv_misc_pelt_12 [id] => 52980 [name] => Pristine Hide [quality] => 3 ) ) [3] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 1 [icon] => inv_misc_volatilewater [id] => 52326 [name] => Volatile Water [quality] => 1 ) ) [4] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 1 [icon] => inv_misc_volatilefire [id] => 52325 [name] => Volatile Fire [quality] => 1 ) ) [5] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 1 [icon] => inv_misc_volatilelife_green [id] => 52329 [name] => Volatile Life [quality] => 1 ) ) ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=67148 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [icon] => inv_pant_raidshaman_i_01 [id] => 67148 [level] => 359 [name] => Kilt of Trollish Dreams [quality] => 4 [type] => Mail ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 196103 ) ) [disenchantLoot] => SimpleXMLElement Object ( [@attributes] => Array ( [requiredSkillRank] => 500 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [dropRate] => 6 [icon] => inv_misc_crystalepic [id] => 52722 [level] => 85 [maxCount] => 1 [minCount] => 1 [name] => Maelstrom Crystal [quality] => 4 [type] => Enchanting ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=62363 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => inv_boots_raidshaman_i_01 [id] => 62363 [level] => 359 [name] => Earthmender's Boots [quality] => 4 [type] => Mail ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 159778 ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=59310 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => inv_bracer_raidshaman_i_01 [id] => 59310 [level] => 359 [name] => Chaos Beast Bracers [quality] => 4 [type] => Mail ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 102564 ) ) [disenchantLoot] => SimpleXMLElement Object ( [@attributes] => Array ( [requiredSkillRank] => 500 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [dropRate] => 6 [icon] => inv_misc_crystalepic [id] => 52722 [level] => 85 [maxCount] => 1 [minCount] => 1 [name] => Maelstrom Crystal [quality] => 4 [type] => Enchanting ) ) ) [dropCreatures] => SimpleXMLElement Object ( [creature] => Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [area] => Blackwing Descent [classification] => 3 [dropRate] => 3 [id] => 43296 [maxLevel] => 88 [minLevel] => 88 [name] => Chimaeron [type] => Beast ) ) [1] => SimpleXMLElement Object ( [@attributes] => Array ( [area] => Blackwing Descent [classification] => 3 [dropRate] => 2 [id] => 47774 [maxLevel] => 88 [minLevel] => 88 [name] => Chimaeron [type] => Beast ) ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=60314 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => inv_glove_raidshaman_i_01 [id] => 60314 [level] => 359 [name] => Gloves of the Raging Elements [quality] => 4 [type] => Mail ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 105223 ) ) [disenchantLoot] => SimpleXMLElement Object ( [@attributes] => Array ( [requiredSkillRank] => 500 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [dropRate] => 6 [icon] => inv_misc_crystalepic [id] => 52722 [level] => 85 [maxCount] => 1 [minCount] => 1 [name] => Maelstrom Crystal [quality] => 4 [type] => Enchanting ) ) ) [dropCreatures] => SimpleXMLElement Object ( [creature] => Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [area] => Baradin Hold [classification] => 1 [dropRate] => 1 [id] => 47120 [maxLevel] => 88 [minLevel] => 88 [name] => Argaloth [type] => Demon ) ) [1] => SimpleXMLElement Object ( [@attributes] => Array ( [area] => Baradin Hold [classification] => 1 [dropRate] => 1 [heroic] => 1 [id] => 51350 [maxLevel] => 88 [minLevel] => 88 [name] => Argaloth [type] => Demon ) ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=59220 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => inv_misc_rubystar [id] => 59220 [level] => 359 [name] => Security Measure Alpha [quality] => 4 [type] => Miscellaneous ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 53434 ) ) [disenchantLoot] => SimpleXMLElement Object ( [@attributes] => Array ( [requiredSkillRank] => 500 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [dropRate] => 6 [icon] => inv_misc_crystalepic [id] => 52722 [level] => 85 [maxCount] => 1 [minCount] => 1 [name] => Maelstrom Crystal [quality] => 4 [type] => Enchanting ) ) ) [dropCreatures] => SimpleXMLElement Object ( [creature] => Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [area] => Blackwing Descent [classification] => 1 [dropRate] => 3 [id] => 42180 [maxLevel] => 88 [minLevel] => 88 [name] => Toxitron [type] => Mechanical ) ) [1] => SimpleXMLElement Object ( [@attributes] => Array ( [area] => Blackwing Descent [classification] => 1 [dropRate] => 3 [id] => 49050 [maxLevel] => 88 [minLevel] => 88 [name] => Toxitron [type] => Mechanical ) ) [2] => SimpleXMLElement Object ( [@attributes] => Array ( [area] => Blackwing Descent [classification] => 1 [dropRate] => 2 [id] => 49056 [maxLevel] => 88 [minLevel] => 88 [name] => Arcanotron [type] => Mechanical ) ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=67129 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [icon] => inv_misc_pearlring1 [id] => 67129 [level] => 359 [name] => Signet of High Arcanist Savor [quality] => 4 [type] => Miscellaneous ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 53434 ) ) [disenchantLoot] => SimpleXMLElement Object ( [@attributes] => Array ( [requiredSkillRank] => 500 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [dropRate] => 6 [icon] => inv_misc_crystalepic [id] => 52722 [level] => 85 [maxCount] => 1 [minCount] => 1 [name] => Maelstrom Crystal [quality] => 4 [type] => Enchanting ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=62465 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => inv_misc_branch_01 [id] => 62465 [level] => 359 [name] => Stump of Time [quality] => 4 [type] => Miscellaneous ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 80507 ) ) [translationFor] => SimpleXMLElement Object ( [@attributes] => Array ( [factionEquiv] => 0 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => inv_misc_branch_01 [id] => 62470 [level] => 359 [name] => Stump of Time [quality] => 4 ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=62047 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [icon] => inv_inscription_tarot_volcanocard [id] => 62047 [level] => 359 [name] => Darkmoon Card: Volcano [quality] => 4 [type] => Miscellaneous ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 107343 ) ) [disenchantLoot] => SimpleXMLElement Object ( [@attributes] => Array ( [requiredSkillRank] => 500 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [dropRate] => 6 [icon] => inv_misc_crystalepic [id] => 52722 [level] => 85 [maxCount] => 1 [minCount] => 1 [name] => Maelstrom Crystal [quality] => 4 [type] => Enchanting ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=67131 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [icon] => inv_misc_cape_cataclysm_caster_c_01 [id] => 67131 [level] => 359 [name] => Ritssyn's Ruminous Drape [quality] => 4 [type] => Cloth ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 99205 ) ) [disenchantLoot] => SimpleXMLElement Object ( [@attributes] => Array ( [requiredSkillRank] => 500 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [dropRate] => 6 [icon] => inv_misc_crystalepic [id] => 52722 [level] => 85 [maxCount] => 1 [minCount] => 1 [name] => Maelstrom Crystal [quality] => 4 [type] => Enchanting ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=61338 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => inv_mace_1h_pvp400_c_01 [id] => 61338 [level] => 359 [name] => Vicious Gladiator's Gavel [quality] => 4 [type] => One-Handed Maces ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 334291 ) ) [disenchantLoot] => SimpleXMLElement Object ( [@attributes] => Array ( [requiredSkillRank] => 500 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [dropRate] => 6 [icon] => inv_misc_crystalepic [id] => 52722 [level] => 85 [maxCount] => 1 [minCount] => 1 [name] => Maelstrom Crystal [quality] => 4 [type] => Enchanting ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=55070 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [icon] => inv_shield_bwdraid_d_02 [id] => 55070 [level] => 359 [name] => Elementium Stormshield [quality] => 4 [type] => Shields ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 115029 ) ) [disenchantLoot] => SimpleXMLElement Object ( [@attributes] => Array ( [requiredSkillRank] => 500 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [dropRate] => 6 [icon] => inv_misc_crystalepic [id] => 52722 [level] => 85 [maxCount] => 1 [minCount] => 1 [name] => Maelstrom Crystal [quality] => 4 [type] => Enchanting ) ) ) [createdBy] => SimpleXMLElement Object ( [spell] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => spell_shadow_sealofkings [id] => 76455 [name] => Elementium Stormshield ) [reagent] => Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 8 [icon] => inv_misc_ebonsteelbar [id] => 53039 [name] => Hardened Elementium Bar [quality] => 1 ) ) [1] => SimpleXMLElement Object ( [@attributes] => Array ( [count] => 1 [icon] => inv_misc_pyriumbar [id] => 52186 [name] => Elementium Bar [quality] => 1 ) ) ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=64672 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => inv_shield_56 [id] => 64672 [level] => 359 [name] => Relic of Norgannon [quality] => 4 [type] => Relic ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [sellPrice] => 101843 ) ) [disenchantLoot] => SimpleXMLElement Object ( [@attributes] => Array ( [requiredSkillRank] => 500 ) [item] => SimpleXMLElement Object ( [@attributes] => Array ( [canAuction] => 1 [dropRate] => 6 [icon] => inv_misc_crystalepic [id] => 52722 [level] => 85 [maxCount] => 1 [minCount] => 1 [name] => Maelstrom Crystal [quality] => 4 [type] => Enchanting ) ) ) ) ) ) SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_us [requestQuery] => i=65904 [requestUrl] => /item-info.xml ) [itemInfo] => SimpleXMLElement Object ( [item] => SimpleXMLElement Object ( [@attributes] => Array ( [icon] => inv_misc_tabard_tolvir [id] => 65904 [level] => 85 [name] => Tabard of Ramkahen [quality] => 1 [type] => Miscellaneous ) [cost] => SimpleXMLElement Object ( [@attributes] => Array ( [buyPrice] => 10000 [sellPrice] => 2500 ) ) [vendors] => SimpleXMLElement Object ( [creature] => SimpleXMLElement Object ( [@attributes] => Array ( [area] => Uldum [classification] => 0 [heroic] => 1 [id] => 48617 [maxLevel] => 83 [minLevel] => 83 [name] => Blacksmith Abasi [title] => Ramkahen Quartermaster [type] => Humanoid ) ) ) ) ) ) I guess the shirt and tabard can be identified by the "[Quality]=>1" which no other items should typically have. The big issue comes with the third odd ball (off hand). This off-hand could be a shield or any weapon with few exceptions depending on the player class. As I continue to try and figure this out, one solution could be to first take the previous two "[Quality]=>1" items out of the equation IF they exist, then ONLY IF there are 17 items remaining subtract the value of block/iteration 17 before calulating as usual. If 16 items, then just run $calc is it currently is. How would I accomplish this? I do not mind displaying the item's name, in fact I would prefer to keep the item list as it currently I just need to not include the said items in the item level average. I know this is probably relatively straight forward to accomplish and that I am a noob, but would be grateful of your assistance. Thanks. I’m trying to work out how I can use php gd to take an image, in this case it’s a rectangle that has text in the middle and the rest is transparent, so it’s a png with just text in the centre.
I have another image which is a texture. Its also a rectangle of the same size. I have managed to merge the two together so the texture on top of the text image but it covers the entire image rather than just the text in the middle.
what I need it to do it apply the texture to the text in the image and ignore the surrounding transparent pixels.
Hi people, I really hope you guys can help me out today. I'm just a newbe at php and i'm having real trouble. Bassically all I want to do is have a user type in a company name in a html form. If what the user types in the form matches the company name in my php script i want the user to be sent to another page on my site. If what the user types in the form doesnt match the company name in my php script i want the user to be sent to a differnt page like an error page for example. this is my html form: Code: [Select] <form id="form1" name="form1" method="post" action="form_test.php"> <p>company name: <input type="text" name="company_name" id="company_name" /> </p> <p> <input type="submit" name="button" id="button" value="Submit" /> </p> </form> And this is the php code I'm trying to process the information on: Code: [Select] <?php $comp_name = abc; if(isset ($_POST["company_name"])){ if($_POST["company_name"] == $comp_name){ header("Location: http://www.hotmail.com"); exit(); } else{ header("Location: http://www.yahoo.com"); exit(); } } ?> The thing is i'm getting this error when i test it: Warning: Cannot modify header information - headers already sent by (output started at D:\Sites\killerphp.com\form_test.php:10) in D:\Sites\killerphp.com\form_test.php on line 17 Please can some one help me out, i'm sure this is just basic stuff but i just cant get it to work Cheers. I'm normally fairly proficient with PHP, but I haven't done any coding in quite a while, so I'm a little rusty. I have an entire page of text from which I need to extract a single value. Here is a small portion of the page in question: Code: [Select] Total Rank: 128 Total Points: 4,978 Next Rank: 20 For instance, I need to extract the values "128" "4978" and "20" and store them in variables. These values change all the time, so I'm not sure what the best way to go about this is... maybe a regular expression ? If that's the case, I've never been too good with them, so any help would be appreciated. Hi there, Is it possible to hide text on a page using PHP? For example, hide the word "hello" every time it appears on the page? Or have it display in a different color? Hi All, Bit of a strange one but i would like to be able to supply a URL to a page. This page will always contain an image and the copyright that goes with it for example http://www.geograph.org.uk/photo/693325 The copyright lies undearneath I would like to get some php code that would automatically grab the image and copy this to a directory on mt site and also take the creative commons copyright notice as a string ( which i will then display along side the image when i add it to my site) How can i do this through php I know that the word "copyright" only ever appears once on the page ( as part of the bit im trying to grab) so can i use this somehow to grab the whole string? Basically im being lazy and would like to automate the process of grabbing the image and copywrite without having to download it to my computer first and reload to my server ( as i will be doing this quite a lot) Any ideas much appreciated Thanks So I have a database with BLOBs (jpeg images). I also have a handy PHP page to display the image given an image ID. This page works fine, by getting the data, setting the content-type header to "image/jpeg", and echoing the data. Now here's the rub: I need the page to also display other information, in text / html format (i.e. show image, and below it show time the image was taken and other information also stored in the database. Because the content-type header has been set as "image/jpeg", I can't display this additional content. How can I make this work? Thanks! I currently have a mailing list that my boss uses, when he adds an email there is no 'sucess message' to let him know it has worked.
The mailing list just redirects back to the add subscribers page. I wondered if its possible to add a request so when he adds an email I can redirect the url to this:
?page=addemail&message=your email was added
and then echo $message where I want it to appear.
I have added $message = $_REQUEST['message']; to my page but nothing is happening. Can I not use request like this?
I am trying to force home landing page text onto this wordpress themes (weblizar Enigma) standard page (which doesnt seem to allow for this even with settings/reading/static/home page option selected wordpress settings)
The landing page just seems to be wigitised.
In a nutshell, I want to have a "page" of text on home page below banner slider and instead of "BLOG" and blog text. Hope this makes sense.
Not getting help from theme author and I have been pointed towards .phpfreaks
This is the website below....
http://www.cloudchasing.co.uk
Thankyou in advance guys
This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=347332.0 Hi, I want to show part of the text from a page containing my article on my main page. The article resides in a database in mysql. How do I limit the amount of text that is shown without setting up a separate excerpt box for the article. I want to then provide a link so the user can go to another page that displays the entire article. Thanks for any suggestions. |