Jump to content

Nakor

Members
  • Posts

    127
  • Joined

  • Last visited

Everything posted by Nakor

  1. Nakor

    Simple Login

    You would want to put that code at the top of every page that requires the user be authenticated. You could add an element to the login.php form as well so that it can recognize where it came from and redirect them back to that same page they were requesting.
  2. I can think of 2 ways to do this, one way being much easier in my opinion. First, you could have it validate the information before it sends the form. if ((isset($fName)) && (isset($lName)) {This is where you would put the code that you are using to complete submitting the form.}else {Don't send the form.} In the else bracket you could check for which fields have not been filled in, set some variables and put a message at the top of the page, set some text to red, or add whatever you would like to alert them to the fields they didn't fill out.
  3. Nakor

    File manager

    Worked perfectly. Thanks. I had it set as a relative path to the index file so I didn't even consider that. This is definitely very well made. Good job.
  4. It does. What he is saying is that you can use the modulus operator. The only issue with the code posted by jesh is that it will return saying that the number is odd if you input something that is not a number. You can catch that easily with an else if.
  5. Nakor

    File manager

    When I attempt to make a directory I receive this errorWarning: mkdir() [function.mkdir]: No such file or directory in E:\Program Files\XAMPP\xampp\htdocs\filemanager\index.php on line 185It also treats function.mkdir as a link to a file it believes should exist http://localhost/filemanager/function.mkdir
  6. Nakor

    if statment

    All commands in PHP are case sensitive. If you enclose the variable in double quotes the case is preserved. If you want you can convert the string to entirely lowercase or uppercase using the strtolower ( string $str ) or strtoupper ( string $string ) functions respectively.
  7. Nakor

    PHP RSS Reader

    Well if all that you want is a working PHP RSS Reader/Parser then you should have just searched on Google. Here are 2.http://www.phpfreaks.com/script/view/703.phphttp://lastrss.oslab.net/However, you should know that if you simply use these and don't even read through them and attempt to understand them then you are not learning anything and you will not increase your skill at coding PHP.
  8. Nakor

    include

    You should check the configuration directories. There is a setting that allows you to tell PHP where to look for the files. You can read about it here:http://us3.php.net/manual/en/ini.core.php#ini.include-pathAlso:To the best of my knowledge there is no difference between using include("") and include "". The only difference is between include and require. Require() and include() are identical in every way except how they handle failure. They both produce a warning, but require() results in a Fatal Error. In other words, don't hesitate to use require() if you want a missing file to halt processing of the page. include() does not behave this way, the script will continue regardless.
  9. Nakor

    save information

    A cookie is the best way to do this being as that they can leave the page and then come back and have the data still entered. Check out this page for how to work with cookies.http://www.w3schools.com/php/php_cookies.asp
  10. Nakor

    Database Error

    There are 2 ways. First, you can simply use the root account to create the database instead of the kaymeis account. Or you can give kaymeis permissions to add databases. If you intend to add databases frequently this is your best bet because it is a security risk to use the root account frequently.
  11. Nakor

    writing data to a file

    You can open the file in read mode, read backwards 2 characters, put that into a variable, then read backwards to the beginning and put that in a variable. Then you can close the file and open it again in write mode. You can then re-write all of the beginning from the second variable, append whatever you want to write, and then put on the first variable to close it.
  12. Nakor

    Date format with +1

    I would use the timezone function putenv("TZ=US/Eastern"); There is a complete list of timezones here.
  13. Nakor

    Password in MySQL

    Yes, you can store the passwords in a safe way. I assume you are going to be using PHP to input it into the database, if this is the case when you input it make sure to enclose the password with one of the hashing calls, ex. shal() crypt()...etc...
  14. That's probably because win[].closed isn't an object. You should use win.closed.
  15. Also, if you are passing any form elements into that page you can do a very quick if (!$_POST[form_element]) {header("Location:redirectpage.php");exit;} This will not allow them to view the page unless certain elements have been filled out. However, this can be sort of unsafe being as that people can pass in variable names in the status bar. You should probably stick with sessions.
  16. First try and add this to the head <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> If that doesn't work, then try and run your code through the W3 Validator.
  17. Post your full code first. From what it looks like, it could be that you didn't close your iFrame tag.
  18. You have PHP and MySQL, which are in my opinion very easy to start off with. You can have the form action point to wherever you want, as long as it is a script that you own (it would be useless to point to a script on someone else's domain). Let us know what you want to be able to do and we will help you out all we can.
  19. Nakor

    Page Footer

    Yeah when I was writing that I was thinking about overlapping. That is always an issue unless you find some way to keep it from going to a certain height with CSS.
  20. Nakor

    Page Footer

    Ah...well then setting the position as fixed should fix that correct?
  21. Nakor

    Page Footer

    Why not just try something like #footer {bottom: 0px;position: absolute;text-align: center;}
  22. Then replace define('MODULE_PAYMENT_WEST_TEXT_EMAIL_FOOTER', "PAYMENT INSTRUCTIONS" . "\n\n" . 'You have two options when using Western Union' . "\n\n" . '1. Visit WesternUnion.com' . "\n" . 'Select the Money Transfer Option and follow the on screen directions' . "\n" . 'You can pay with a bank debit card or credit card' . "\n" . 'Western Union will charge you a money transfer fee' . "\n" . 'Send the amount of the total shown above' . "\n\n" . 'Visit a local Western Union agency' . "\n" . 'Fill out the necesarry Send Money form, ask agent if you need assistance' . "\n" . 'They will require a valid ID' . "\n" . 'You can pay with cash, a bank debit card or credit card' . "\n" . 'Western Union will charge you a money transfer fee' . "\n" . 'Send the amount of the total shown above' . "\n\n" . 'Using either method, provide the following Receiver information:' . "\n\n" . ' . MODULE_PAYMENT_WEST_PAYTO. ' . "\n\n" . 'Once payment has been sent, please send an email to this address:' ' . MODULE_PAYMENT_WEST_EMAIL. ' . "\n\n" . 'Include your first and last name, your order number and the Money Transfer Control Number. Thanks!' ); with define('MODULE_PAYMENT_WEST_TEXT_EMAIL_FOOTER', "PAYMENT INSTRUCTIONS" . "\n\n" . 'You have two options when using Western Union' . "\n\n" . '1. Visit WesternUnion.com' . "\n" . 'Select the Money Transfer Option and follow the on screen directions' . "\n" . 'You can pay with a bank debit card or credit card' . "\n" . 'Western Union will charge you a money transfer fee' . "\n" . 'Send the amount of the total shown above' . "\n\n" . 'Visit a local Western Union agency' . "\n" . 'Fill out the necesarry Send Money form, ask agent if you need assistance' . "\n" . 'They will require a valid ID' . "\n" . 'You can pay with cash, a bank debit card or credit card' . "\n" . 'Western Union will charge you a money transfer fee' . "\n" . 'Send the amount of the total shown above' . "\n\n" . 'Using either method, provide the following Receiver information:' . "\n\n" . MODULE_PAYMENT_WEST_PAYTO. "\n\n" . 'Once payment has been sent, please send an email to this address:' . MODULE_PAYMENT_WEST_EMAIL. "\n\n" . 'Include your first and last name, your order number and the Money Transfer Control Number. Thanks!' ); He simply put the <?php there to show that it was PHP, becuase it is correct, and if he used an editor with syntax-color highlighting he needed it so that it would work correctly. It's location bears no significance on his code.
  23. @media Print refers to anything that has to do with printing. Then if you go down into the stylesheet you see what's he's done. He does normal CSS by defining P, the paragraph tag (<p>), and then sets it's properties to display:none, making it not show up. So this means that anything with a <p> tag around it will not print, as opposed to the text with the <div> tag around it, which will print. You can make this easier by defining classes. <style>@media Print { .noprint { display:none; }}</style><p class=noprint>I won't print</p><p>I will print</p><div class=noprint>I also won't print</div><div>But I will</div> Anything that you define as the noprint class won't print.
  24. Nakor

    DTD Tutorial

    Google is your friend.
×
×
  • Create New...