Jump to content

hoangthi

Members
  • Posts

    56
  • Joined

  • Last visited

Everything posted by hoangthi

  1. I am not sure, I'll check it out. I am using Mysql in Xampp
  2. Hello friends I got a problem with Mysql. I want to link ONE UID in table Account to MANY UID in table Chat I set UID as foreign key in table Chat and then, references to account (UID) I tried to use Navicat to make a relationship but not succeed What I want is UID in table Chat MUST be one of the UID in table Account This is images: UID in this table is NOT one of UID in table Account Longing for your helps!
  3. Hello. I am new at AJAX, today, I made a small script, that will post a data and return that data. It works very well in my Localhost: but after I had uploaded to my hosting, It didn't work anymore. I don't understand what happened. here is my code: file ajax_post : <!DOCTYPE html> <html> <head> <title>The 2nd ajax</title> <meta charset="UTF-8"> <script> function loadXML(){ var httpXML; if (window.XMLHttpRequest) httpXML= new XMLHttpRequest(); else httpXML=new ActiveXObject("Microsoft.XMLHTTP"); httpXML.onreadystatechange=function(){ /* readyState: 0: request not initialized 1: server connection established 2: request received 3: processing request 4: request fished and response is readyState status: 200: "ok"; 404: page not found */ if (httpXML.readyState==4 && httpXML.status==200){ document.getElementById('myDiv').innerHTML= httpXML.responseText; } } httpXML.open("POST","test.php",true); httpXML.setRequestHeader("Content-type","application/x-www-form-urlencoded"); httpXML.send("input="+document.getElementById('form1').value); } </script> <body> <input type="text" value ="Type something" name ="input" id="form1"/> <button type="submit" onclick ="loadXML()"> Click here</button> <div id="myDiv"> The information appears here. </div> </body> </head> file test.php: <?php echo "you have inputted:".$_POST['input']; ?> Please help me to resolve this!
  4. Oh right, I can use function: explode
  5. I have a sentence: $s = 'this,is,a,my example !'; So I want to get this: $s2[0] = this $s2[1] = is $s2[2] = a $s2[3] = my $s2[4] = my example ! I tried to use a for loop to strlen ($s) but not successful So thanks for helping
  6. Hello friends I have some secret informations need to be saved in Mysql Database and I need to show them in some cases. So how should I encode and decode them safely ? I think I can use Md5 to encode the password and noone can see the password anymore. But here, I need to show in browser the information which encoded. So who can help me ? Thanks in advance!
×
×
  • 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.