Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. scorpion4377

    Why does nobody use single quotes?

    Everybody uses double quotes, from the people at PHP.net to some people who make big open-source projects. But why? Its MUCH slower, and using single quotes in more professional. Why doesn't everybody use single quotes? Just wondering. Sorry if this is off-topic.
  2. scorpion4377

    What tools including Code Generators do you use?

    Ha? I use wordpad.
  3. scorpion4377

    Working with large numbers without GMP

    Since PHP can't compute anything with large numbers, and my server doesn't have GMP installed, I made a few quick functions that can add, multiply, and find the factorials of large numbers. With my function, the exact value of 51! can be evaluated in 3 seconds. Of course, since I rushed...
  4. scorpion4377

    Cookie/Browser Security

    You really have a few choices. 1. Write a secure code that runs sessions. Sessions cannot be edited by the user (Unless you leave a security whole in your script), so they're very safe, and very easy to work with. Problem, you have to login every time. 2. A cookie that will directly contain...
  5. scorpion4377

    PHP common practices - regarding log in.

    You can send MySQL queries without being logged in. To add a row to a MySQL table, you need to use something like this: $q = "INSERT INTO `table` (`$_name`, `$_email`) VALUES ('$name', '$email')"; mysql_query($q); I'm not sure if your columns are actually named $_name, or _name. Only PHP...
  6. scorpion4377

    Is PHP script correct

    You have both PHP and HTML errors. The action is going to send.php, so the PHP code must be on send.php. As for the PHP part: Never use request. Its unsafe. You correctly set $email, but $message is still unset if you have register globals off. Also, you shouldn't use double quotes. It slower...
  7. scorpion4377

    Question on the amount of tables and queries a project should use

    I recently made a site in PHP and MySQL where you can, with a valid code, add a poll with 2-5 choices. Your poll is added automatically, and everybody can vote on it. I have three tables: -Codes (Stores valid codes) -Polls (Stores the questions, information about who added the poll, and the...
  8. scorpion4377

    category structure of a shop

    Erm. That's kind of confusing. Can we see your code? Sometimes the code itself speaks better.
  9. scorpion4377

    help automatically creating new user subdirectory

    Oops. Should be: mkdir('./' . $username . '/', 0777); Sorry about that.
  10. scorpion4377

    help automatically creating new user subdirectory

    mkdir('.' . $username, 0777);
  11. scorpion4377

    Problem with arrays and variable variables

    $$name[1] = 2; // This will set a variable with a name of $name[1] to 2. But, I want to do this: $($name)[1] = 2; // I want it to make the variable to be an array. I know I can use $$name = array(), but that's not very dynamic. Thanks!
  12. scorpion4377

    PHP newbie

    Use single quotes when you can. $headers = 'Webmaster <cada@dd.com>'; mail('email', 'subject', 'contents', 'From: ' . $headers); Try to avoid things like: $x = 'f'; $x .= 's'; $x .= 'y'; Its better just to use one line of statement.

Part and Inventory Search

Back
Top