Jump to content

stig1

Members
  • Posts

    107
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

stig1's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. I require no spaces within this tag throughout the xml document - <DeliveryStateCode></DeliveryStateCode> So whenever that tag comes up within the xml document, make sure there is no spaces where the data will go.
  2. Its only the data within that tag. I am new to using xml with php.
  3. I have an xml file that I require to search and locate tags / data to update an modify, and re-save as an xml file. For example: Locate <DeliveryStateCode>NT </DeliveryStateCode> and replace with <DeliveryStateCode>NT</DeliveryStateCode> There could be many records within the xml file using the <DeliveryStateCode></DeliveryStateCode> tags. Otherwise, if there is a solution to just remove the space at the end of the data- <DeliveryStateCode>NT </DeliveryStateCode> throughout the xml file within the <DeliveryStateCode></DeliveryStateCode> tags, that would work aswell. Been having trouble figuring this out. Look forward to hearing some responses, and thankyou in advance
  4. thank you for your assistance it works like a charm!
  5. I have the current data show up when I do a var_dump. Code $result = $wrap->get_lists(); echo "Result of lists:<br />"; if($result->was_successful()) { echo "Got lists\n<br /><pre>"; var_dump($result->response); //print_r($result->response); } else { echo 'Failed with code '.$result->http_status_code."\n<br /><pre>"; var_dump($result->response); } echo '</pre>'; Data Output array(303) { [0]=> object(stdClass)#5 (2) { ["ListID"]=> string(32) "df2d1497b0f4bdc3b8b77863f6721025" ["Name"]=> string(14) "DATA1" } [1]=> object(stdClass)#6 (2) { ["ListID"]=> string(32) "f44d9acf655e914b944d7174bdd521ff" ["Name"]=> string(14) "DATA2" } [2]=> object(stdClass)#7 (2) { ["ListID"]=> string(32) "c84f4ba6b86bc508e6922f4ca44ab41c" ["Name"]=> string(14) "DATA3" } [3]=> object(stdClass)#8 (2) { ["ListID"]=> string(32) "b7dc652cd5060194362f19667ddf47e9" ["Name"]=> string(14) "DATA4" } } What I need to achieve is get the data in "ListID" out so I can run "ListID" through another function of mine, to delete records. Any ideas, how I would get "ListID" values out of the array?
  6. Hey guys, What i would like to create is the ability to calculate the difference between two dates / times. For example: 2010-12-13 10:00:00 to 2010-12-17 17:00:00 In a format of days / hours and minutes / seconds. However, I only want to calculate for an 9-5 work day, not the hours outside. Is this possible? If so, how would I go about creating something like this.
  7. but wont that get rid of them all? or only the last <br /> in the array? for example: error 1: no items<br /> error 2: no qty<br /> so output would look like error 1: no items<br /> error 2: no qty Thats what I am looking to achieve.
  8. I have the following foreach statement that gets the error msg's from the array called errors. However for the last key in the array, i would not like the <br /> to be echo'd out. How can I achieve that? foreach ($errors as $msg) { echo $msg; echo "<br />"; }
  9. yes, same domain. my header redirect at preset is confirm.php?id=100 but i want the url in the browser to just show confirm.php
  10. yep, so basically i submit the form to a processing page, if errors, returns back to the submit page, but if no errors, it goes to the confirm page.
  11. arriving from a page called process which processes the form data and then sends a header location of confirm.php?id=100
  12. Hey everyone here at phpfreaks What I would like to know, if possible, is how would i achieve the following: I have a page called confirm.php?id=[uniqueid] [uniqueid] = the next record in the database, so 1 to any number possible. I would like the page to just show confirm.php in the url, however, I still want to pull out of the database some information about the record that was just entered. so from confirm.php?id=100 to just confirm.php Any ideas?
  13. i pretty sure i worked it out, i wrote the following: $kv = array(); foreach ($_POST as $key => $value) { $kv[$key] = "$value"; } to pull the data out i just use the $kv["keyname"] and it seems to work!
  14. I have a form with lots of fields. How would I run a loop to get each field name and data into an array, so i can then send it off to a function to process each field name / data differently. Instead of typing all the variables in the main function name for each post. Would a foreach statement work?
  15. I have the following rule in my .htaccess file. #RewriteCond %{SERVER_PORT} ^443$ #RewriteRule !^(cart|account)(.*)$ http://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] #RewriteCond %{SERVER_PORT} ^80$ #RewriteRule ^(cart|account)(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] It seems to work, however, when I access the SSL Folders, firefox and other browsers give me that im showing unauthorised content issues. I think its referring to the images / css / js on the page. I have the css set on the page to https:// already, but the images inside are coming with http:// as firefox tells me. How can I fix this unauthorised content issue?
×
×
  • 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.