Jump to content

BeanoEFC

Members
  • Posts

    19
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

BeanoEFC's Achievements

Member

Member (2/5)

0

Reputation

  1. Thanks for the reply requinix. Yes, the malformed XML is intentional. Any pointers or tutorial links to make an XML parser? Regards, -Ben
  2. Hey Everyone, I have been given an assignment where i am given an XML file and i need to parse it. The XML is in the following format: <?xml version="1.0"?> <title>Library</title> <library> <book id="1"> <author>J.K.Rowling</author> <name>Harry Potter and the Philosopher's Stone</name> </book> <book id="2"> <author>J.K.Rowling</author> <name>Harry Potter and the Chamber of Secrets</name> </book> </library> The problem i have is when i try an parse this XML, with SimpleXML, i get the following error The source of this error is due to there being no root node. This has left me in a bit of a predicament. Is there anyway of parsing XML in this format without the root node being added? Regards, -Ben
  3. Hey Everyone, I need to have the ability to create PDF/X1A documents. My initial thoughts are it would be easy as i have created PDFs in the past with no hassle. I have been trawling the google and various blogs but with no joy. Does anyone have any experience creating PDF/X1A documents in PHP ? Is it possible ? Regards, -Ben
  4. Hey Everyone, I am looking for some advise with regards to CMS. I have built applications with Zend in the past and I am fairly competent when it comes to the Framework. I have been given a project which now requires a CMS. In the past i have created my own CMS, but these have by no means been brilliant, they have simply got the job done. I have looked around and i have seen that Drupal and Joomla! are recommended CMS, but i have no experience with these CMS applications. Am I reinventing the wheel by creating my own CMS? If so are CMS like Drupal and Joomla! easy to drop into the Zend Framework? Also, if i create an application, which is intended to be white labled, and sell the application on do i infringe on the license agreement of CMS such as Joomla! ? What are the advantages/disadvantages of using an open source CMS instead of a custom build CMS? Any and all opinions are welcomed =) Regards, -Ben
  5. Hi again, I did this with the following function function array_unique2($array) { $out = array(); //loop through the inbound foreach ($array as $key=>$value) { //if the item isn't in the array if($value == NULL){ $out[$key] = $value; } if (!in_array($value, $out)) { $out[$key] = $value; } } return $out; } This has seemed to to the trick. Sasa, thank you very much for your help. Its greatly appreciated =) regards, -Ben
  6. Hi sasa, Thanks for the help you are a life saver. I do have a followup questions though. As this data is collected from my database, there will sometimes be null values. The function array_unique() groups all the null values values into a one value. Is there a way to use array_unique() with a clause where if NULL then ignore? Regards, -Ben
  7. Hi Everyone, I have a problem displaying some information from an array (selected from my database). The array is below. Array ( [0] => Array ( [ssc_skill_categories] => Web [sc_skill_categories] => Programming ) [1] => Array ( [ssc_skill_categories] => Actionscript [sc_skill_categories] => Programming ) [2] => Array ( [ssc_skill_categories] => C# [sc_skill_categories] => Programming ) [3] => Array ( [ssc_skill_categories] => CSS [sc_skill_categories] => Programming ) [4] => Array ( [ssc_skill_categories] => Graphic [sc_skill_categories] => Designers ) [5] => Array ( [ssc_skill_categories] => Logo [sc_skill_categories] => Designers ) [6] => Array ( [ssc_skill_categories] => Illistration [sc_skill_categories] => Designers ) [7] => Array ( [ssc_skill_categories] => Animation [sc_skill_categories] => Designers ) ) What i would like to to is display this information in a table like so: <html> <body> <table> <tr> <td>Programming</td><td>Web</td><td>Actionscript</td><td>C#</td><td>CSS</td> <tr> <tr> <td>Designers</td><td>Graphic</td><td>Logo</td><td>Illistration</td><td>Animation</td> <tr> <table> </body> </html> I have been trying and failing all day to do this. Posting my "progress" will clog up the thread, so for now i wont post it. Does anyone have an idea how i would achieve this? Regards, -Ben
  8. Hello Again Everyone =) I posted this message earlier in the week but I had an issue with me webhost. So now the DNS propagation has completed, lets go for a second attempt . . . I am a university student in my final year at Manchester Metropolitan University, England. For my final year project I was given the task of creating a training tool for cyclists. I have just finished the first iteration of my implementation stage and I need what I have done evaluating. This is where the good people of phpfreaks come in =) I have asked for help on this forum numerous times, and have been given excellent feedback. So . . . I was hoping that if some of you had time you would visit my site and see what you think. The URL of my site is www.cyclingassistant.com Should you choose to visit my site, after registering you will be taken to the home page. Please read this. It again explains what I am doing, but it also provides you with a download link to my evaluation walkthrough. The evaluation walkthrough asks you to complete some simple tasks (well, I hope they are simple haha). After the evaluation walkthrough has been completed it would be of great help to me f you completed the evaluation questionnaire. Thank you all in advance, -Beano
  9. Well this isnt a good start =( In a nutshell the webhost i was with failed. so i had to change the webhost i was with to a more reliable one. I know this is no consolation to the people that took time out to try and have a look at my site. To them people, i apologise. My site is going through DNS propagation now and will be done within 48 hours. Again im sorry to anyone that visited cyclingssistant.com, i didnt mean to waste your time Regards, -Beano
  10. Hello Everyone, I am a university student in my final year at Manchester Metropolitan University, England. For my final year project I was given the task of creating a training tool for cyclists. I have just finished the first iteration of my implementation stage and I need what I have done evaluating. This is where the good people of phpfreaks come in =) I have asked for help on this forum numerous times, and have been given excellent feedback. So . . . I was hoping that if some of you had time you would visit my site and see what you think. The URL of my site is www.cyclingassistant.com Should you choose to visit my site, after registering you will be taken to the home page. Please read this. It again explains what I am doing, but it also provides you with a download link to my evaluation walkthrough. The evaluation walkthrough asks you to complete some simple tasks (well, I hope they are simple haha). After the evaluation walkthrough has been completed it would be of great help to me f you completed the evaluation questionnaire. Thank you all in advance, -Beano N.B. I am using 000webhosting as my web host. I have had some issues with the server being too busy, and have lost my connection with the site for around 30 seconds. I apologise if this happens when you visit.
  11. hey Everyone, Im am displaying variables in textboxs. The problem i have is if they are more than one word long i get an unexpected result. For Example: $var = "hello"; This will display as expected. $var = "hello world"; This would only display "hello" The code i am using in my text box is as follows <input name="name" type="text" onchange="funcName(this, 'inf_pdt', true);" value=<?php echo $var; ?> /> Please can someone help me out? Thanks, -Beano
  12. Thank you PFMaBiSmAdPosted. Regards, -Beano
  13. Hey Everyone, I am trying to display some data i have in my mysql database in a table. im having a problem with the SQL to do it though. what i am trying to do is display the amount of calories for a day, there could be multiple entries for a day. This is the data from my database: +-----------------------------+-----------------+ | substring(r.ride_date,1,10) | calories_burned | +-----------------------------+-----------------+ | 2010-01-08 | 250 | | 2010-01-08 | 123 | | 2010-01-08 | 123 | | 2010-01-10 | 456 | +-----------------------------+-----------------+ What i want is to select the the distinct days (2010-01-08 and 2010-01-10) and add up the calories for them. the SQL i am using is this: select distinct(substring(r.ride_date,1,10)), sum(calories_burned) from rides r join usersrides ur on r.ride_date = ur.ride_date join users u on ur.userid = u.userid where u.userid='1'; this does not produce the result im looking for though, it just sums up all the calories burned into one row +-------------------------------+----------------------+ | (substring(r.ride_date,1,10)) | sum(calories_burned) | +-------------------------------+----------------------+ | 2010-01-08 | 952 | +-------------------------------+----------------------+ Please can someone point me in the rite direction Thanks in Advance, -Beano
  14. Thank You nilambar and cags =) Regards, -Beano
  15. Hey Every1, I am trying to send a value submitted from a dynamic select list to a different page. However im running into problems. Here is my code for the 2 pages <html> <head> </head> <body> <form name="blah" method="post" action="selectlist3_1.php"> <select> <option>--Select Ride Destination--</option> <?php // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $query="select ride_name from ridedetails order by ride_name asc"; $result=mysql_query($query); while(list($ride_name)=mysql_fetch_row($result)) { echo "<option name='ride_name' value=" . $ride_name . ">" . $ride_name . "</option>"; } ?> </select> <input type="submit" name="Submit" value="Submit" /> </form> </body> </html> <html> <head> </head> <body> <?php $ride_name_post = $_POST['ride_name']; $ride_name_get = $_GET['ride_name']; echo "hello"; echo "<br>"; echo "Ride Name (get) : " . $ride_name_get; echo "<br>"; echo "Ride Name (post) : " . $ride_name_post; ?> </body> </html> I have been trying to duplicate the way i send values via a textfield by giving the <option> tag a name and and capturing the value by using $_POST['ride_name']. This is not working though. Any help would be appreciated. Regards, -Beano
×
×
  • 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.