Jump to content

peranha

Members
  • Posts

    878
  • Joined

  • Last visited

Everything posted by peranha

  1. <? is the short version, and may not be supported on some servers.
  2. The code that I have when I am viewing the website online, all the images are not put into the page. I want to deny direct access from outside, but have direct access from these 3 addresses. If I add 127.0.0.1 it does not change anything, script still runs, but does not add any images to the page. htaccess order deny,allow deny from all # allow the admin allow from 191.168.150.100 # allow moderator: allow from 192.168.150.102 # allow server (this for scripts, etc to work): allow from 127.0.0.1 httpd.conf <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/mberanek/newsite/pics/"> AllowOverride All </Directory>
  3. $count = mysql_query("SELECT count(numbers) from `info`"); you want to use SUM $count = mysql_query("SELECT SUM(numbers) from `info`");
  4. Yes you can include a file that is not in the same folder, as far as different servers, not sure.
  5. It works now, after a couple of more restarts. here is my vhosts file in apache <VirtualHost *:8204> DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/mberanek" ServerName localhost </VirtualHost> <VirtualHost *:8204> DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/mberanek/test" ServerName test.localhost </VirtualHost> and this is my hosts file in windows # Copyright (c) 1993-1999 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host 127.0.0.1 localhost 127.0.0.1 test.localhost Not sure why it didnt work after the first restart, but it finally does. Thanks
  6. This is my hosts file as well # Copyright (c) 1993-1999 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host 127.0.0.1 localhost 127.0.0.1 test.localhost
  7. yes i did, and to make sure, I restarted the PC after that didnt work.
  8. yes I have, when i go to test.localhost and localhost, they both go to "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/mberanek" which is localhost. It will not got to localhost/test when I go to test.localhost not sure why.
  9. <VirtualHost *:8204> DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/mberanek" ServerName localhost </VirtualHost> <VirtualHost *:8204> DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/mberanek/test" ServerName test.localhost </VirtualHost>
  10. I am registered with Website website with godaddy, and I am hosting on my own server at my house. i would like to add test.Website.com. do I have to register this with godaddy, as well?? I dont have a cpanel installed on my server, so I am woundering if there is another way, or if not, what type of cpanel do you recommend??
  11. Even if I am hosting on my own server, do I still have to register my domain, or is there something in apache that will do this.
  12. I cannot think of what it is called. I want to add a prefix to my website. I want to add test.site.com to my website site.com, but cannot think of how to word it to do a search. I tried virtual host, but that didnt work as it only set it up to go to http://site/ and http://test/.
  13. I am trying to get this to work but cannot. order deny,allow deny from all # allow the admin allow from 192.168.150.100 # allow moderator: allow from 192.168.150.102 # allow server (this for scripts, etc to work): allow from 192.168.150.156 it is in a file called .htaccess, and is located in the pics folder of my website. I am not that great at htaccess, but cannot find anything online for this issue as everything that I find has this exact code in it. I want it to deny direct access to everyone except these 3 ipaddresses. Does anyone know why it doesnt work. I am using apache 2 if that helps. anything I need to change in the config file?
  14. http://us.php.net/date
  15. should be echo "<img src=\"http://www.runningprofiles.com/images/$getuser3[image]\" border=\"0\" />"; without the ' quotes in the url
  16. How do you store it in the website so you know they are logged in, or dont you store the username??
  17. mysql_query("CREATE TABLE myscorev1(id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(30), score INT, gameid INT);") should be mysql_query("CREATE TABLE myscorev1(id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(30), score INT, gameid INT)");
  18. CREATE TABLE myscorev1(id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(30), score INT), gameid INT) should be CREATE TABLE myscorev1(id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(30), score INT, gameid INT);
  19. what ever the value of $i is is what the sent_messages field will be. If there are more than 1 row, then all rows will be set to the value of $i ex if more than 1 row with your current update script. $i = valuei id sent_messages 1 value1 2 value2 3 value3 will become id sent_messages 1 valuei 2 valuei 3 valuei
  20. you can run it like that, but it is going to update everything in sent_messages to the value of $i
  21. if you echo $id what do you get?? is it empty?? Also this $id = $_GET['id']; gets the id from the url as in www.somesite.com/page.php?id=12345
  22. Just to let you know, this will probably be moved as well, as it has nothing to do with php
  23. peranha

    Use * ?

    I have always been told to just select the data that you need, not all of it by using *. I have not seen a big different in using * though.
  24. Also all of these $playerinfo[hp] should be $playerinfo['hp'] with the '
×
×
  • 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.