Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. You may want to use \r\n instead.
  2. Change your echo statement in your while loop too: echo $row['cat'] . ' ('.$row['num'].') <br>';
  3. Look in the user comments section its the first post..
  4. Could be a number of things Either PHP is set to timeout too early, 30 seconds is recommended You have an error in your script which is terminating the script early Or it could be your HTTP server terminating the connection prematurely. Have a word with your web host about this, in the mean time check your servers error logs to see if is a PHP error causing this.
  5. You should see a Topic Solved botton located near the bottom left of this post and just above the Quick Reply box
  6. Oops. Should of been printf('value="%1$02d">%1$02d</option>', $jj);
  7. wildteen88

    Weird Gap

    Always make sure you have a valid HTML Doctype. Without a Doctype browsers go in to quirks mode (otherwise known as non-standards mode).
  8. => should be >= => is used to set keys within an array
  9. Change echo "value\"=".$jj."\">".$jj."</option>"; to sprintf('value="%02d">%02d</option>', $jj);
  10. Definitely not! What you should do is only set the necessary permissions for the file(s) you're trying to read/write too. Something like CHMOD 0755 should do.
  11. I don't think there is a built in function for copying folders. Instead you'll have to first create a new directory then loop through all the files in the folder your want to copy to the new folder. Once you have copied all files delete the old folder.
  12. That is no where near the PHP syntax. More like Javascript. You cannot call PHP code based on a user event. This can only be archived by a Client Side Languages such as javascript.
  13. What happens if you remove the following line in login.php (apart from the header disappearing) <?php include "header.php"; ?>
  14. Whats on line 2 in view_database.php
  15. I have tested your code in IE7 and it works fine for me.
  16. Use echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
  17. To implement this just change <?php // database connection info $conn = mysql_connect('localhost','username','password') or trigger_error("SQL", E_USER_ERROR); $db = mysql_select_db('database_name',$conn) or trigger_error("SQL", E_USER_ERROR); to <?php require('includes/application_top.php'); Now create the file includes/application_top.php and place the following code <?php // database connection info $conn = mysql_connect('localhost','username','password') or trigger_error("SQL", E_USER_ERROR); $db = mysql_select_db('database_name',$conn) or trigger_error("SQL", E_USER_ERROR); ?> Your script should still work as normal.
  18. What is the relevance between the two blocks of code you posted. I cannot seem to see any relevance. You should also post what the code is supposed to do. What the code is doing now, rather than saying it doesn't work.
  19. Where is the $row["admin"] variable set to? Also you do not need to call session_start in admin.php if its is being included into index.php
  20. You should use urldecode when getting data from the url that is encoded.
  21. How would we know? We dont run your site/manage the server your site is hosted on. Your host is the only one that can answer that. You'll be better of posting the parts of code that fail to work.
  22. SQL values need to be warped in quotes. mysql_query("INSERT INTO monsters (monster, loc) VALUES('$ucTitleString', '$loc' ) ") or die(mysql_error()); mysql_query("INSERT INTO monsters (spawn, drops) VALUES('$spawn', '$drops' ) ") or die(mysql_error()); mysql_query("INSERT INTO example (hp, exp) VALUES('$hp', '$exp' ) ") or die(mysql_error()); echo "Data Inserted!";
  23. Change include "./common_db.inc"; $link=db_connect('sample_db'); to include "./common_db.inc"; $default_dbname='sample_db'; $link=db_connect();
  24. Any editor can edit .tpl files, if the editor is any good you should be able to configure the editor to recognise .tpl files as a certain language such as PHP.
  25. All those errors are caused by the first error message: That error suggests to me that the file b4455fc53a5d2d957cb3008951386b27.txt in ./storagedata doesn't have the correct read (and/or write) permissions. CHMOD 0644 should suffice for just reading files, 0755 for writing to files.
×
×
  • 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.