Jump to content

Ingolme

Moderator
  • Content Count

    14,445
  • Joined

  • Last visited

  • Days Won

    105

Everything posted by Ingolme

  1. It's a little complicated, you have to have the list of the cities for each country stored somewhere (a database or XML file). When you change the select option, you have to use javascript to get the list of cities for the selected country and append <option> nodes to the other <select>. Making the full code would take me a little while, so I'm not going to do it.
  2. Each <input> tag needs to have an ID to make it easier to reference with the getElementById() function.
  3. I don't know if this will help but I notice you have a single quote instead of a double quote at the end of the string.Try header("Location: next.php?id=" . $id);And if not, then the problem must be with the $id variable.
  4. Oh! now I get it!You don't use the + operator for concatenation in PHP, you use a . .header("Location: next.php?id=' + $id); //wrongheader("Location: next.php?id=' . $id); //right
  5. Most likely you haven't defined $id before so it appears empty.
  6. Ingolme

    Flash Stage Size

    I'm afraid I don't program much ActionScript, but what I do know is that this should work between any two documents that are open at the same time, independently of where the files are located. One may be on a server while the other is on your computer.Use the flash help library for more information on localConnection.
  7. For safety, try using encodeURIComponent on anything you want to add to the query string:item = encodeURIComponent(document.getElementById("items").value);xmlHttp.send("item="+item);
  8. Ingolme

    image cursor

    I've done tests on my own, I even tried a GIF format image, it worked in Firefox and Opera, but not IE. I guess you'd need to save it as .cur to do that. I don't have an image editor that does it.
  9. You put the PHP in a separate page, exactly the same way it is, you call that page with AJAX:xmlHttp.open("POST",filename,true);
  10. You can use AJAX, it maybe a bit hard to understand at first.Here's W3Schools' tutorial: http://w3schools.com/ajax/default.aspUnfortunately in W3Schools they never gave an example of actually sending data. To do that, just modify the script at W3Schools by adding this: xmlHttp.open("POST",filename,true); xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); xmlHttp.send(querystring);
  11. location is just a property of the window, according to W3C standards.And since when the capital C in "onclick"?
  12. <input type="button" onclick="window.location.href = 'URL'" value="Click here" />
  13. Ingolme

    new to php

    I don't recommend pages that adjust by the resolution: Some computers have panoramic screens or have different unknown kinds of resolutions. The best thing is to make a dynamically changing design, or give it a static width that is suitable for most people. (760px is usually my choice if the page is static)
  14. Ingolme

    SPLIT FUNCTION IN PHP

    You can make it into an array with explode:$s = "Rs.1200.35";$s = explode($s,".");/*Output would be:$s[0] => "Rs"$s[1] => "1200"$s[2] => "35"*/
  15. Ingolme

    INSERT IN ORDER

    Well, the table is created already. You can go modify the table with PHPmyAdmin if you want, and if not then drop that table and create a new one. If AUTO_INCREMENT isn't activated you'll need to go increasing the ids manually.What I'd do in that case is check the highest existant ID in the table and sum 1 to it and put it in the new register.
  16. I think you can use the toString() method to turn the MovieClip reference to a string. Then it should have a .length property.
  17. Ingolme

    session issue

    It looks to me as if you cannot access another partition of your hard drive from the file's current location:No such file or directory(2) in e:\test\test.php is referring to "D:/PHP/sessiondata/session_os ... "
  18. Ingolme

    image cursor

    Try CSS:div#fm { cursor: url(filename.cur);}You can use url() to reference an external cursorHere's a list of default cursors(source: W3Schools):autocrosshairdefaultpointermovee-resizene-resizenw-resizen-resizese-resizesw-resizes-resizew-resizetextwaithelp
  19. Well, putting it inside the button tag would help you make a layout if you wanted it to be a real button: <button class="main"><div class="left"><div class="right">Button text</div></div></button> CSS: .main {background: url(backgroundimage.jpg) center center repeat-x;text-align: center;height: /* Put button height here */px;.left { background: url(left-button-image.jpg) center left no-repeat; }.left { background: url(right-button-image.jpg) center right no-repeat; }
  20. Ingolme

    INSERT IN ORDER

    That can only mean one thing:id has AUTO_INCREMENT activated and you had some rows in the database before, it doesn't matter if you deleted them or not.
  21. Ingolme

    new to php

    In PHP you don't use "OR" you use a double bar ( || ). And you'd need to declare the condition for each of the variables separately, like this:if($username == "" || $password == "")
  22. Just use switch() with the variable that defines the language of the page:switch($def_lang)And put the PHP within the title tags:<html><head><title><?phpswitch($def_lang) {// ... ...}?></title>......
  23. Ingolme

    project

    Wait a minute, changewindow.onload = welcome();for window.onload = welcome;And see if it works.
  24. There has to be some PHP code before that line. And in the code before you forgot a semi-colon (; ) at the end of the instruction.
  25. Ingolme

    project

    The answer is simple. Put this in the head: <script type="text/javascript">function print(ans) { document.getElementById("here").inner HTML = "Welcome to my site, " + ans + ", have fun here";}function welcome() { var answer = prompt("What's your name?",""); if (answer) { alert("hi " + answer + " !"); print(answer); } else { alert("You are lucky, you can remain anonymous!"); }}window.onload = welcome();</script>
×
×
  • Create New...