Jump to content

zachninme

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by zachninme

  1. Exactly. That is why most websites won't give you your password, but they'll allow you to change it.
  2. I was wondering how I can use PHP to have "pseudo-pages" where a user can go to http://www.mysite.com/myphp/PAGE , but its really just myphp.php parsing "PAGE" as a variable, and creating content from that. I've seen it used in MediaWiki, but I couldn't isolate the code that did that. Thanks for the help
  3. Argh! I tested it, and thought it worked, but I guess I didn't test it thoughly enough. I might have to make up the string.Figured a solution that seems to work, escaping & to "%2526". The PHP decodes some stuff anyway, so this fit right in.
  4. That won't work either.I might have to make up a string that I can hope no users use by accident.This is really puzzling :)EDIT: Haha, found the problem.1. I used the JS function encodeURI, which doesn't encode &'s2. I then used "content = content.replace(/&/, "%26");", in which I forgot the g (/&/g)Sorry
  5. I don't think you understand...I guess this is on the wrong board, now that I think about it, but what happens is I'm sending the POST string, and in it, are escaped &'s. PHP takes this, and thinks its the next item in the $_POST array.So when I send "blah<span id='hey'>yeah</span>", the < and > ito <, and >, respecively.When it sends it as "blah<span id='hey..." It has "blah" as one item, then $_POST['lt;span id='] = "'hey...";
  6. I have a site where I am using a WYSIWYG editor, and I am saving the documents using AJAX methods, sending the data through javascript to a PHP page. There are some things that I have to encode, for instance "<", into "<". When I want to save, I get the HTML, then use the JS function urlencode(), and then send it to a PHP in a POST string.After wondering why it was always incomplete, I found that the encoded & tricked PHP into thinking that it was another parameter.Thanks to anyone who can figure this out!
  7. I was planning on doing the user id idea, but how do I store the polls of which users voted/users that voted on polls?Do I make a separate table?
  8. Is there anyway to do this? Sorry I'm being a bit annoying, but I really need to figure this out
  9. I am using the mysql_escape_string() , and is there any way to strip the "/"s when I get the data back from the DB?
  10. Hello.I am working on something where I want my users to be able to vote on numerous submitted items. I also want to make sure that no one votes twice or anything.How should I set up my tables to disallow users from voting more than once on each item?Thanks in advanced!
  11. Out of curiosity, if a page returned the escape characters, when placed in the page, would it stay "escaped" or would it become HTML?
  12. Hello!I have a site where I am trying to get data from a DB, using a PHP script, but then I want to be able to access that data by calling a JS function, and have the data returned.The PHP script works fine, and the data is always returned within a second or so, but I can't figure out how to merge the following two functions (adapted from the tutorial) var myScorefunction loadScores(){xmlHttp=GetXmlHttpObject()if (xmlHttp==null) { alert ("Browser does not support HTTP Request") return } var url="getscore.php"xmlHttp.onreadystatechange=stateChangedxmlHttp.open("GET",url,true)xmlHttp.send(null)//while(myScore==undefined)//{}//return myScore}function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { myScore=xmlHttp.responseText } } I tried doing something like what is commented out, but it went into a loop and never came out.TIA!
×
×
  • Create New...