Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by chitchirya

  1. Try this print "<p>Username is ".$txtUserName." and the password is ".$txtPassword."</p>"; Hope it helps.
  2. chitchirya

    Variable Issue!

    I tried you code above and it works perfectly. Do you have any other code in you db_getColumn.php? Just put this code in your db_getColumn.php with no other codes. <?php$merk = $_GET['d'];echo $merk;?> It's working fine. It alerts testing.
  3. chitchirya

    Variable Issue!

    Try to change this $result = mysql_query("SELECT IDmerken FROM merken WHERE Merk = '" . $merk . "'"); to $result = mysql_query("SELECT IDmerken FROM merken WHERE Merk = '$merk'"); Tell me if it works.
  4. chitchirya

    Variable Issue!

    With this code, xmlhttp.open('GET', "db_getColumn.php?d=" + merk + "'", true);For what is that bold for?
  5. you don't need to put double quotes when your are displaying the content of a variable.just type echo $news;
  6. $result = mysql_query("SELECT * FROM char ORDER BY DESC"); How do you order your selection? ORDER BY?
  7. Solved. Thanks for the help. I just lack quotes from my code. Lol! Well thanks again for helping.
  8. Typo error. It's $_GET['sname']; It's right on my code. It prints Array ( [sname] => Sample1) <--Without spaces.It prints nothing and does not have error <--With spaces. It shows http://localhost/SCa...name=Sample%203 Edit: When I click the link above it shows Array ( [sname] => Sample 3 ).This is right. But how come it does not read when I echo $_GET >,<
  9. I tried this on my javascript sname = encodeURIComponent(sname); I'm alerting it and it shows the %20 for my whitespaces. This is how I pass it. xmlhttp3.open("GET","info.php?sname="+sname,true); This is how I get it. My sname do have spaces so it make all spaces into %20 but then, when I try to get and echo the sname it shows nothing. $sname = $_GET['sname']; I see on the other site saying "The superglobals $_GET and $_REQUEST are already decoded." but why when I try echo $_GET['name']; it shows nothing...
  10. So I need to encode it in javascript and decode it in php?
  11. Oh.. I now get it. But another problem occurred. It is possible for javascript to pass a variable who's value has whitespaces?I didn't seem to work when I use this code xmlhttp3.open("GET","info.php?sname="+sname,true);
  12. I have this code: <select name=".addslashes($result['skill_name'])." onChange='showRlvl(this.value,this.name); showPoint(this.value,this.name)'> My problem is, every time I alert the this.name under showRlvl function, it does not include the whitespaces of my select name.For example my select name is abc d. It will only alert abc. But when it comes with an underscore, it does read it.As you can see on the above code, I add addslashes but still don't work. How can I pass it? Can anyone help me with this? Thanks and God bless!
  13. For search, you can use this. <!---for textbox --><input type="text" name="txtSearch"><!---for search button --><input type="button" value="Search" name="Search"> On the upper part of your page, put this code <?phpif(isset($_POST['Search'])){ $product = stripslashes($_POST['txtSearch']); if($product == ""){ header("Location:search.php"); } else{ session_start(); $_SESSION['Search'] = $product; header("Location:search.php"); }}?> Then put this code on the upper part of your search page to get the value you have passed. <?phpsession_start();$search = $_SESSION['Search'];?> Lol, that's what my small mind can do. Maybe long and tricky but that is what I do it. Lol! Hope it helps =)
  14. I'm really glad. Truly a simple code in javascript >,< I'm glad I learned. Thank you Mr. Ingolme, your so kind, nice and intelligent. I come up with this code. inputs = {};function showPoint(value,name){inputs[name] = value;total = 0;for(var abc in inputs) { total += Number(inputs[abc]);} I'm so happy I already got it on my own. Anyway thanks for the help and the codes everyone had posted in this thread espescially for Mr. Ingolme. I got the logic behind my problem because of him. He is awake even on nights till dawn, lol! =). Truly this forum helps a lot of people. God bless all, more power, Have a nice day and learn a lot! =)
  15. I come up with this code in javascript. inputs = {};function showPoint(value,name){inputs[name] = value; for (var name in inputs) { spa -= inputs[name];}document.getElementById("sp").innerHTML = spa;} my problem is that it doubles the subtraction of the inputs[name] in my spa. I know I've done something wrong here...
  16. Ohhh, okay. I now get it. Well, after I finish this, i'll try it to work in javascript. Thank you and God bless =)
  17. Can I ask for the last time, I did not use $_SESSION instead, I used a button named Reset. Here is the code: if(isset($_POST['Reset'])){ $file = "info.txt"; unlink($file); echo "<script LANGUAGE='javascript'> window.location='home.php';</SCRIPT>";} Would it not affect others when others are using the same file?
  18. This is sooooo cool!! I made it because of you! Thank you for your caring and guiding in me. God bless this site and God bless all of you. I learned a lot. Thanks! Till then! The only problem I do have now is $_SESSION and I think I can do it this time. Thank you again. =) Have a nice day and God bless!
  19. With the code you had posted, there is an error. Fatal error: Cannot use object of type stdClass as array in... Yes, I can say I'm still new to javascript and some sort in php and still learning a lot of things. That is why I'm asking. But I know I'm wrong because I'm asking far too way beyond my knowledge. I'm sorry...
  20. So I should modify all my codes and try it to Javascript? But why it does not store on my text file. Same when I print it, It only prints 1 value.
  21. What my problem now is to encode the values of the array to a file through json_encode. Yes I can now store A VALUE that I have clicked last but not all of what I have clicked...
  22. $file = 'info.text';$input = array();foreach($_GET['input'] as $sname=>$value){$input = json_encode($_GET['input']);file_put_contents($file, $input);}echo $input; I do this but it does not store the values, only the last value I clicked were saved.
  23. Yes but I'm having hard time on Javascript... I don't know where to start =( If you could teach me where to start, then I'll be glad....
  24. No I don't. It's purely on the client side. I'm just using database on storing my data to be printed out on the site. So I need to use $_SESSION? Well I'll try it. =) Thanks!
  • Create New...