Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by lanmind

  1. After a while I figured out that "$1" was a backreference. I hadn't used a backreference before. Works fine Thank you.
  2. Synook's article "Notes on WYSIWYG" gives insight on this. It's in his sig.
  3. Hello everybody,I'm currently using the replace method and regexs twice to replace space characters (\040) at the beginning and end of a string with nothing like so: var string = " good day ";// replace spaces at the beginning (^) string = string.replace(/^\040*/,"");// replace spaces at the end ($)string = string.replace(/\040*$/,""); I haven't been able to figure out why I can't replace the spaces at the beginning and the end of the string in one statement like so: var string = " good day ";// replace spaces at the beginning and end (^,$)string = string.replace(/^\040*$/,""); I don't wan
  4. I use Filezilla and it's simple. I believe I only read it's tutorial once and since then it's been a snap, plus free. If you are just starting out I recommend using the many online tutorials for web developers. W3Schools covers many subjects as I'm sure you've realized. Right?For a beginner developer I believe their web building tutorial is a great place to start: http://www.w3schools.com/site/default.aspInside there is a glossary of web terms that might help you understand some things in the future: http://www.w3schools.com/site/site_glossary.aspI also like to use Wikipedia for terms I don't
  5. Hello everybody,I've been doing web development on the side for a while now. I don't know many people at all who are web devs so I don't talk about it much at all. This has been bugging me lately and so I've been actively seeking out web devs. I mostly find them on Microsoft's online gaming service Xbox Live because I play games online often. If anybody here also enjoys XBL let me know! I've been meaning to come on forums like this to ask general questions that might be common chat for others who are consistently around other devs. A web development work environment comes to mind. Here's some
  6. Hello everybody,If anybody can help explain my questions I'd appreciate it. When you use a POST request versus a GET requset with Ajax how come:One- Some http headers must be sent along with any POST request? Like so: http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");http.setRequestHeader("Content-length", params.length);http.setRequestHeader("Connection", "close"); Two- The data to be sent must be sent as the argument of the send function? Like so: http.send(params); I'm really clueless why headers must be sent on a POST versus a GET requset.Thank you for your ti
  7. Jonas,I sent you the question in a message. I understand the rule of one account per person. Thank you for the support.
  8. I wanted to ask some (legitimate) questions containing code that I didn't want the internet to know was related to my lanmind account.
  9. Hello everybody,I love W3Schools.com. So much help for beginners.Bye bye.
  10. Hello,Does anybody know if there are problems with new accounts being verified by the administrators? I created a new account forty eight hours ago and it needs to be reviewed before I can post with it. I'm supposed to contact a administrator with this problem but all three of them aren't accepting messages. Maybe they are busy but I hope they see this.
  11. I'm sorry I worded my question wrong. What I wanted to ask was:Do you think I need to URL encode space characters as they are illegal in URLs?I figured that I do because if a user submits "user name" it will become part of the html file name like so: user name.html. Of course spaces are illegal in URLs so the address http://www.example.com/userpages/user name.html would return a 404 error.Thank you.
  12. Hello,I have some user submitted data that becomes part of a html file name and so in turn will be displayed as a URL across different browsers. I allow the submitted data to contain the URL illegal space character. When I submit it using my Firefox browser the space is automatically encoded to a "+". I'm not sure if this happens with every browser so I'm wondering if I need to encode any space characters before sending them to my server script.Thank you for your time.
  13. lanmind

    Two Questions

    Oh yes that's good. I'll ask my host if only my scripts have access to my files. Thanks.
  14. lanmind

    Two Questions

    Just now through my FTP I noticed that default files that came preloaded in my document root (404 error page) have the same owner id INT as files PHP created and files I created. All the same owner.
  15. lanmind

    Two Questions

    $_SERVER['USERNAME'] was unavailable, fileowner() returned the user id as a INT but POSIX functions are unavailable to me. I couldn't get the user info with posix_getpwuid().I'm dealing with file permissions now because I'm trying to secure my scripts in a shared hosting environment. I'm not able to put sensitive data above my document root. Right now they are in a directory in the root with a .htaccess file declaring "deny from all".
  16. lanmind

    Two Questions

    1. Are global variables unavailable to only custom functions or PHP's built-in functions too?2. When the Apache software on my hosting provider's server reads my files to serve them is it doing so as "other"?I'm confused about Apache in relation to file permissions. I am the "user" of my files, there's also "group" permissions to be set and then there are "other" permissions too. Is Apache "other"?File permissions reference:http://en.wikipedia.org/wiki/File_system_permissionsThank you for your time.
  17. lanmind

    Links :)

    Hello,I've been web developing now for almost two years and I don't have a live site up for the public. I'm not using anything like Dreamweaver just hand coding everything. I've learned the XHTML, CSS, javascript, PHP and XML languages well. I've also been working with Ajax, MySQL and RDFa. I don't regret any of it as I believe I could get a job in the very least with a web dev company. Great in this economy. I like it but even with all the tutorials online the learning curve is steep if you want to make a well designed dynamic site of your own. It seems to me that a lot of times people take f
  18. Hello,I am having such a problem understanding how my directory on a shared hosting/linux server works.My document root is /html and this is where I currently have my default.html file. I can't put anything above this.1. If I put sensitive data in a "/html/passwords" folder is this considered "out of the document root" and out of the public eye?2. If I make another directory "/html/public" and put my default.html file there then would the directory "/html/passwords" for sensitive data be out of document root?3. How do I know what the "highest" directory is visitors can get to?4. Do my php file
  19. Thank you AElliot.
  20. Hello all,Is it possible to have comments in a php.ini file?Thank you for your time.
  21. lanmind

    Php Modules?

    Hello everybody,I'm having a hard time finding out what a PHP module is. Right now I'm working on security. In this tutorial under the "Data Filtering > The Include Method" header:http://phpsec.org/projects/guide/1.html#1.4They use a file named "/process.inc" to handle security. They are calling this file a module. So in this case a module is simply a file that is included? Are modules files on the same server as a script?
  22. Hello,Do you mean the second time it loops though the code another header is being called after the output of the first loop and that generates an error? Because the first loop is fine not generating any notices or errors.
  23. So I'm outputting XML and I'm trying to output XML continuable in a loop while a condition is true. Here is what I have: $originalquestion= mysql_query("SELECT question, answer, id from answers WHERE id='{$_SESSION['userid']}'"); $row = mysql_fetch_array($originalquestion); while ($row['id']<=500) { header("Content-type: text/xml"); echo '<person>'; echo "<result>" . $row['id'] . "</result>"; echo "</person>"; } When this script is run I'm getting a "junk after document element" error. I believe since a new header is being started after the XML root
  24. Yes this was the problem. I stopped the Notice from being outputted by prepending line 33's expression with "@". Anybody know of a way to call seperate functions in PHP based upon two seperate HTML forms? I believe the easiest way is to make two seperate PHP scripts to handle each but I'd like to keep all my PHP in one script.I was thinking something like:if isset($_POST['name']){ function code...}else{ var= $_POST['age'] function code...}Just not sure if this is possible.
  • Create New...