Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Ingolme

  1. In the same page that precesses the form data you can send an email with the PHP mail() function.Just inclusd the data within the message body text.
  2. onlyNumber receives an event (e).That event contains data, the data of the key that was pressed is e.keyCode.If e.keyCode is not within the ASCII character codes between "0" and "9" (ASCII characters from 48 to 57) then do not write the character.
  3. Ingolme

    Account Activation

    Just write it normally, with http:// at the beggining, and most mail clients should interpret it as a link automatically. Put a notice for them to copy and paste it if it's not a link.
  4. You need to use javascript for some of it.Here's what you can do without java script:Password field: <input type="password" />Read only: <input type="text" readonly="readonly" />Hidden input (you can use it to transfer data written by a server side language: <input type="hidden" name="name" value="something" />Limit the number of characters:Put this in the <head> of your document: <script type="text/javascript">function charLimit(obj) {if(obj.length > 15) return false;}</script> This is the input field: <input type="text" onkeydown="charLimit(this.v
  5. Try removing the quotes from these:$value="0"; -----> $value = 0;$var['$value'] -----> $var[$value]It's a number type of data and doesn't need quotes.
  6. Well, that's quite complicated, I'd need to spend some time coming up with a script to do that. In the end I think it's more worth to try other methods.Hmm, let me see how I'd do it.I'd first have all the pages in the same folder, use scandir() ( http://w3schools.com/php/func_directory_scandir.asp ) to return all the pages in that folder.Then I'd go through the files. Better than fopen() I'd use file_get_contents() ( http://w3schools.com/php/func_filesystem_f...et_contents.asp )For each file in the array of files:if(strstr($filestring, [string to be found]) !== FALSE) { // Change $filestring f
  7. I haven't tested this yet (or I think I haven't, maybe I did but it was a long time ago and I don't remember the result) but I think it should work:$string = "This is some textwith a line break";$var = explode("\n",$string);/*Output:$var[1] => "This is some text"$var[2] => "with a line break"*/
  8. Ingolme

    Account Activation

    When I did a script of that sort I put a randomly generated hexadecimal number in one of their empty profile fields of the database table (I used their website one) and I send them an email with a link containing that number in a query string. The link goes to a validation page that compares a variable given in a query string to the data in the database and activates the account if they're the same.
  9. I had a popup window script with this code and the address bar wasn't displayed:"fullscreen=no,toolbar=no,status=no,menu bar=no,scrollbars=no,resizeable=no"
  10. Ingolme


    Just create an object like this:Obj=new Object();Obj.date = [current date];Obj.value1 = "something";Obj.value2 = "something else";
  11. Well, I guess the easiest method would be to store all the page data into the database and then search for it with the SQL LIKE operator.Another idea that come to mind is checking through all the files with PHP, but it takes more work.If you wanted something very easy, google offers customized seach bars for your site.
  12. I have a function that takes dates from databases and returns values from it.This example will print the day onto the page: /* This is the function */function datetime($syntax,$datetime) { $year = substr($datetime,0,4); $month = substr($datetime,5,2); $day = substr($datetime,8,2); $hour = substr($datetime,11,2); $min = substr($datetime,14,2); $sec = substr($datetime,17,2); return date($syntax,mktime($hour,$min,$sec,$month,$day,$year));}/* Call the function and show the day of the given date */echo datetime("d",$row['date']);
  13. You need to write the path of the background image file./background.jpg means the file is in the top level.background.jpg means that the file is in the same folder as the page that's loading it.
  14. Here's a tutorial explaining how to read and write files with PHP:http://www.tizag.com/phpT/files.php
  15. With fopen() and fwrite() and other file functions you can do it.
  16. Well, you'd need a complete understanding of flash for that.Flash is an application that will allow you to create active content that can be embedded into websites.Flash has two parts: the stage and actionscript.The stage is quite simple and easy to understand, it uses vectors for its images rather than pixels.While the stage may be easy, to completely master Actionscript you need a deep knowledge of object oriented programming languages.Actionscript is extremely powerful, with the correct resources you can even communicate with Javascript and potentially with server-side languages (I have app
  17. Ingolme


    WhenEach <input> tag of a form has a name:<form action="page.php" method="get"><input type="text" name="something" /><input type="submit" /></form>For each name a variable will be added to the query string at the end of the url. So imagine we write "Hello" into the text field named "something". The result would look like this in the browser:http:// ...(website path)... /page.php?something=Hello
  18. But wouldn't the value of<input type="text" name="var1" />be $_POST['var1']?
  19. Your code is working ok for me in Firefox and Internet Explorer.About the parenthesis, it's this:You wrote d.getDay and it should be d.getDay(), because getDay isn't a property, it's a method.
  20. I have a certainty that most of my visitors use Internet Explorer yet. Until Internet Explorer 8 comes with E4X, better CSS, more standard Javascript (or ECMAscript) and XHTML support, I'll still have to continue adapting my sites for it.
  21. I'd like to be able to use E4X, it's pretty easy to manage, unfortunately it's not supported by most browsers.
  22. To me it seems to work ok, and my error console returns no errors from the site.
  23. Ingolme


    Google offers customizeable search bars for your website, check it out here: http://www.google.com/coop/cse/
  24. Just the return $days; line. If that line is present the function returns something, if not, nothing is returned.
  25. I guess to simulate "import" you can do this: function House() { ... // some script ... /* This will load other JS files relevant to the library */ files = new Array(); files[0] = "JS file URL"; files[1] = "another JS file URL"; files[2] = "another JS file URL"; for(var i = 0;i<files.length;i++) { el = document.createElement("script"); el.src = files[i]; document.getElementsByTagName("head")[0].appendChild(el); }}
  • Create New...