Jump to content

coops

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

coops's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I’m trying to do a php login system using a form on the main page and then a XML data store on the other side. I seem to be having problems when using some character within the text input box. The characters are £ or ‘. It automatically convert the character to a html code. So ‘ convert to \’ etc. So when it is place through the validation or straight into the xml it falls down….. The set up I am using, is an input text box on the form page, then I would use $_POST to retrieve the data from the form. I have tried using html_entity_decode() php internal function, but it doesn’t seem to do anything….. Has anyone else had this problem and if so how did they get around this? Thanks
  2. Sadly I need the pound Sing as the function goes through a string to look for character that affecting XML and converts it into the HTML code and then inputs the new string into XML. The data comes from a form, using $_POST so $value = $_POST... then the $Value is converted to an array $value{}... Then it loops around looking for the characters that will affect XML and replace them... But using $_POST already converts £ and ' ... but does not convert any other character that will affect XML.......
  3. This will give a value of The £ sign comes from the form tho and then it goes into the original function (stated at the beginning), but Don't know why its converting the £ to a HTML code when changing the variable to a array.. But if it goes straight to an string and not using the form ITS ALL OK $value = "£" ; echo "Size ".strlen($value); while($i < strlen($value)){ $ia=0; echo "<br>".$value{$i}; $++; } This will show the correct data
  4. The code I'm using for the form is <form onsubmit="return check(this)" action="store.php" method="post" name="fromMain" target="_self" id="fromMain"> <input name="txtCustomerName" type="text" id="0"> and within store.php, I'm using a $_POST to retrieve the string
  5. Found out that its something to do with the $_POST or the form setup. As if I place the data straight into the fucntion as a string , there is no problems... Does anyone know of a way around this problem?
  6. Thanks, but I have realised its something to do with the form... as I inputted it into the function without the form and all was ok..... Does anyone know anyway that you can resolve this on the form side?
  7. Ok the data is in a textbox called "txtCustomerName" <input name="txtCustomerName" type="text" id="1"> The below code is used to retrieve the data and the echo will be it\'s echo $moduleCustName = valuator($_POST['txtCustomerName']);
  8. HI, I'm doing a simple function retrieve data and export the data into xml, but found out xml does not like all character. The character I have found are '&','','<','>','£'. So I have developed a simple function that will replace curtain character within a string with the HTML code that XML likes. '&#38;','&#172;','&#60;','&#62;','&#163;' It seems to work with all character, but apart from "£" sign. The only reason is because if i use the below code while($i < strlen($value)){ $ia=0; $sign = $value{$i}; while($ia < count($strarValidation)){ if($strarValidation[$ia] == $sign){ $sign = $strarNewChar[$ia]; break; } $ia++; } $endValue.= $sign; The value at $sign = $value{$i}; for a £ is the HTML code, not "£". So the function can't be used... Does anyone else know of a way that I can stop the "£" converting to the html code when converting the string variable into a array? Thanks
  9. Hi, I’m trying to place the data from a textbox within a form into a Variable, but I seem to be having problems. The problem is when it comes to a ‘ e.g. “it’s” or “don’t” the value of the string changes from “don’t” to a “don\’t”. Does anyone know anything that will stop this happening?
  10. yeah use the session_start(); at the top of each page :-(
  11. Hello, I am redeveloping my personal website into a complete php website, using sessions. The session have always worked in the passed but it doesn't seem to keep the session data between different pages. This is only when using Firefox.. Seems fine with internet explorer. my website link would be http://coopsnet.net/sessionstart.php I do my sessions as below.. but it does not seem to keep the data session_start(); $_SESSION['CSSFILE'] = "http://coopsnet.net/maincss.css"; I have a php function method that check this session and if its empty it will loop up back to the sessionstart (where everything is set) and then pack to that page. The server is version 4.4.4.. but can't see this being a prob as it wouldn't work with IE? Anyone with any ideas? Thanks Chris C
×
×
  • 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.