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 strongm 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. alan123

    how to display table status with specific columns?

    Displaying the data through PHP.
  2. alan123

    how to display table status with specific columns?

    For mysql, "show table status" displays all table information such as NAME, TYPE, ROW_FORMAT, ROWS..... How can I only display certain columns(not display all), for example only shows NAME, ROWS?
  3. alan123

    how to run sql script from php?

    can only run one SQL statement? but I know php can run .sql script which contains multiple statements.
  4. alan123

    how to refer config.php in class method?

    I'm sure there's a simple answer to this problem - I have a class that relies on a bunch of vars that are set in a config.php file. I want to be able to use these variables inside my class methods without having to include the config file in every method. For example, I am currently doing this...
  5. alan123

    how to run sql script from php?

    Thanks for the help. Now I got a issue, in createdb.sql, if I only create one table, the php code can generate it correctly, however if I want to create two tables, php cannot generate and gives error "Query failed: You have an error in your SQL syntax near 'CREATE TABLE profile...", I have...
  6. alan123

    how to run sql script from php?

    Thanks for the reply. Yes the db type is mysql. I try to run sql script from php code to create table, but it fails. <? $dbhost = "localhost"; $dbusername = "root"; $dbpass = ""; $dbname = "dbname"; $connection = mysql_connect($dbhost, $dbusername, $dbpass); $SelectedDB =...
  7. alan123

    how to run sql script from php?

    I want to create a table from php by calling a sql script file(createdb.sql), how to impliment this? thanks for any help.
  8. alan123

    How to issue a license for php script?

    Yes, I want to create a very simple verification system, so every time I can deliver php script with a unique license key. I'm new to license thing.
  9. alan123

    How to issue a license for php script?

    For commercial php script, what is the approach to issue the license key? I have written php program, want to know how to generate and verify the license key, is there encryption involved? any help will be appreciated.
  10. alan123

    how to insert a new line into the begin of file?

    I have a text file, and want to insert line "<?php ... ?>" by PHP to the top of this file, I tried: $file = "test.txt"; $fp = fopen($file,'r+'); $newline = "<?php echo "$abc"; ?>"; fwrite($fp,$newline); fclose($fp); but this will replace the character in text.txt with new line added, I need...
  11. alan123

    why I cannot remove directory?

    Thanks for the reply. So how can I remove all files under $dir folder (even includes .htaccess file)?
  12. alan123

    why I cannot remove directory?

    I try to delete directory with php code: unlink("$dir/."); rmdir("$dir"); unlink is supposed to delete all files under $dir folder, but it gives me error message "permission denied", actually I created $dir and its files within the same php file: mkdir("$dir", 0755); copy("abc.htm"...
  13. alan123

    how to use php code to add lines to html file?

    I have a html file, now I want another php program to manipulate this file and add lines such as: <? include_once("abc"); ?> to the top of this html file, so it will look like: <? include_once("abc"); ?> <html> <body> .... </body> </html> how can I do that with php code? anyone can help me...
  14. alan123

    very simple question

    I want to know what is the difference between: $HTTP_COOKIE_VARS['USERNAME']; and $_COOKIE['USERNAME']; Can I use either one in the php code? thanks
  15. alan123

    Authenticate and protect member folders with php/.htaccess?

    Wishdiak, Thanks for the reply. I'm new to PEAR, do you mean if I use Pear::Auth, I can combine apache htaccess and php login form together? so it not only use htaccess to protect folder, but also use php login form to pass username/password to htaccess then authenticate the user, redirect them...
  16. alan123

    Authenticate and protect member folders with php/.htaccess?

    can anyone answer my question? thanks.
  17. alan123

    Authenticate and protect member folders with php/.htaccess?

    I know there is a way to use php session/cookie to authenticate user's login and redict to member index page. But this is only for user authentication, it doesn't provide any way to protect member folder, inside member folder, for php files, it's ok to detect session key to display or deny...
  18. alan123

    how to run php in cgi-bin folder?

    It's not my question, for example I have a simple php file(abc.php): <?php echo phpinfo(); ?> if I have this file in document folder, I can access it without any problem. (www.mydomain.com/abc.php) but if I move it to cgi-bin folder: (www.mydomain.com/cgi-bin/abc.php), it won't work, it just...
  19. alan123

    how to run php in cgi-bin folder?

    I have a php file which runs correctly in document folder, now I want to move it to the cgi-bin folder, however it shows blank page when I try to access it, why the same php file cannot run in the cgi-bin folder, what approach I need to take (modify httpd.conf?) to have this file runs correctly...
  20. alan123

    how to print the contents of text box?

    Hi, There is "window.print();" to print whole page, now I have form textarea box on this page and want only print the contents of this textarea box(it has scroll bar on the right side), how can I do that? can I use javascript or something else to print it? thanks in advance.

Part and Inventory Search

Back
Top