Jump to content

jack5100nv

Members
  • Posts

    42
  • Joined

  • Last visited

    Never

Everything posted by jack5100nv

  1. I mean the code is $languagefilename = "language/english.php"; if (file_exists($languagefilename)) include($languagefilename); else echo("<br><center><b>The file for selected language is missing from the Language folder</b></center><br>");
  2. I am using the file_exists() function to check if the file exists before including it but it always returns false If I take out the file_exists function, I can see that the include function includes the file correct without any errors. Here is the code. what am I doing wrong? $languagefilename = "language/english.php"; if (is_readable($languagefilename)) include($languagefilename); else echo("<br><center><b>The file for selected language is missing from the Language folder</b></center><br>");
  3. I want to dynamically include a file. How can I do something like: <? include('myfolder/$filename.php'); ?>
  4. Ok, I have the following code. I want the form fields with the Submit button nicely tucked in the table row with bgcolor. However, whgen I view it in Firefox or IE8, I get extra space under the form fields (see screenshot). How can I remove that extra space. I tried Including the form in div tags and stuff but no luck. echo(" <br><br> <table align='center' cellpadding='0' cellspacing='0' width='780' valign='top'> <tr> <td bgcolor='#cccccc' align='right'> <form method='post' action='test.php'> <input type='text' size='15' name='searchtext'> <select name='cat'> <option value='1'>Test1</option> <option value='2'>Test2</option> <option value='3'>Test3</option> </select> <input type='submit' value=Submit> </form> </td> </tr> </table> "); [attachment deleted by admin]
  5. Ok, I have the following code. I want the form fields with the Submit button nicely tucked in the table row with bgcolor. However, whgen I view it in Firefox or IE8, I get extra space under the form fields (see screenshot). How can I remove that extra space. I tried Including the form in div tags and stuff but no luck. <html> <body> <br><br> <table align="center" cellpadding="0" cellspacing="0" width="780" valign="top"> <tr> <td bgcolor='#cccccc' align='right'> <form method='post' action='test.php'> <input type='text' size='15' name='searchtext'> <select name='cat'> <option value='1'>Test1</option> <option value='2'>Test2</option> <option value='3'>Test3</option> </select> <input type='submit' value=Submit> </form> </td> </tr> </table> </body> </html> [attachment deleted by admin]
  6. Thanks, has anyone has had any good or bad experiences with other encrypted products.
  7. I am looking for a PHP Encoder to protect my code when I destribute it. I am willing to spend upto $300. However, I want to user a really good encoder which is very hard to decode and does not use any loader to run the encoded files. The following do not use any loader but are easy to decode http://www.phplockit.com http://www.codelock.co.nz The following are good encoders but use loaders http://www.ioncube.com http://www.sourceguardian.com http://phpshield.com Do you guys have a product to recommend to me? I would like to stay away from having m client install loader on their server. Am I making the right decision by not choosing the encoder that uses loaders OR am I just being difficult because using the loader is not a big deal?
  8. Urlencode and urldecode worked great. The script is running smooth now. Thanks DyslexicDog, you are a genius. Also, thank you PFMaBiSmAd for your help.
  9. i used mysql_real_escape(), now it lets me enter the string into the database but I cannot decrypt it since it changes slightly when i use splitslashes on it after getting it out of the db Pass: dxb123 Pass Encrypted: aVí7âcäËå÷ ’³•tg)NÏ퉣:+'\|óß Pass Encrypted Mysql_real_escape: aVí7âcäËå÷\\r’³•tg)NÏ퉣:+\\\'\\\\|óß Pass Encrypted Stripslashes: aVí7âcäËå÷\r’³•tg)NÏ퉣:+\'\\|óß Pass Decrypted: ’ßNyt@QÌÌóYv1¦.ÜÚýYÚ•üh¯…ú®µ˜d"åcRÜÞ‚gÿÅ•’1ö쉭§»ÑX\Ý-™‹ Same using a different text Pass: ss Pass Encrypted: õ!g²…CÛ¹é!ÄÁ+=i&}w´½]VT’ìì“DâÀª Pass Encrypted Mysql_real_escape: õ!g²…CÛ¹é!ÄÁ+=i&}w´½]VT’ìì“DâÀª Pass Encrypted Stripslashes: õ!g²…CÛ¹é!ÄÁ+=i&}w´½]VT’ìì“DâÀª Pass Decrypted: ss Here is the code $optionnewpass1="dxb123"; $optionnewpass1orig=$optionnewpass1; // Encrypting passwords $optionnewpass1 = myencrypt($optionnewpass1); $optionnewpass1enc=$optionnewpass1; $db = mysql_connect("$hostname", "$dbuser", "$dbpass"); mysql_select_db("$dbname",$db); $optionnewpass1 = mysql_real_escape_string($optionnewpass1); //$insert_query = "UPDATE UserList SET username='$optionusername', password='$optionnewpass1', email='$optionemail', firstname='$optionfirstname', lastname='$optionlastname' WHERE userid = '1'"; $insert_query = "UPDATE UserList SET username='".$optionusername."', password='".$optionnewpass1."', email='".$optionemail."', firstname='".$optionfirstname."', lastname='".$optionlastname."' WHERE userid = '1'"; if(mysql_query("$insert_query")) { echo ("Success"); } else { echo("Fail"); echo "<br><br>".mysql_error()."<br>"; } mysql_close($db); /* For Troubleshooting only */ echo("<br>Username: $optionusername"); echo("<br>Pass: $optionnewpass1orig"); echo("<br>Pass Encrypted: $optionnewpass1enc"); echo("<br>Pass Encrypted Mysql_real_escape: $optionnewpass1"); if(get_magic_quotes_gpc()) { $optionnewpass1=stripslashes($optionnewpass1); } echo("<br>Pass Encrypted: $optionnewpass1"); $optionnewpass1 = mydecrypt($optionnewpass1); echo("<br>Pass Decrypted: $optionnewpass1");
  10. Can a blackslash in the encrypted text cause any problem?
  11. I have tried both text and varchar(128), same result.
  12. I have code that encrypts the text using mcrypt and then update it into the database. It works fine except when i try to enter dxb123 it fails Orig: dxb123 Encrypted text: aVí7âcäËå÷ ’³•tg)NÏ퉣:+'\|óß Result: Insertion Failed. Any idea why I cannot insert aVí7âcäËå÷ ’³•tg)NÏ퉣:+'\|óß into the database? Following is my code. I have tried both of the following sql statements --------------------------------------------------------------------- $mykey = "Photo25878Gallery55785"; function myencrypt($pass) { $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); //get vector size on ECB mode $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); //Creating the vector $cryptedpass = mcrypt_encrypt (MCRYPT_RIJNDAEL_256, $mykey, $pass, MCRYPT_MODE_ECB, $iv); //Encrypting using MCRYPT_RIJNDAEL_256 algorithm return $cryptedpass; } $optionnewpass1 = "dxb123"; $optionnewpass1 = myencrypt($optionnewpass1); /* Satement 1 */ $insert_query = "UPDATE UserList SET password='$optionnewpass1' WHERE userid = '1'"; /* Statement 2 */ // $insert_query = "UPDATE UserList SET password='".$optionnewpass1."' WHERE userid = '1'"; if(mysql_query($insert_query)) { echo("Success"); } else { echo("Fail"); }
  13. Thanks for your help guys. If I encode, is it possible to decode it? Also, do you know of any good free encoder?
  14. I am writing a script and would like to have a Powered By message at the bottom of my script. Does anyone know how can I make it impossible or hard to replace? Any help will be greatly appreciated, Thanks.
  15. Anybody using Navicat? A friend of mine told me about it. I downloaded the Windows Lite version for free from http://www.navicat.com/download.html You can download the client on you Windows XP machine and connect to MySQL and then get a dump of as a SQL file. Anybody seen any isues? If you can suggest ,ore products I can try, I would appreciate it.
  16. The session does not loose the value at the same place and not in the same time interval. Its totally random. I haven't tried out the session path yet. Actually I am going to distribute this script on the internet when I am done developing it, so I want to have very few things for my users to configure. Looks like every user will have to configure the path when they install it and I want them to go through as little steps as possible. Could it be that someone else on the shared server is using a session variable with the same name. Could that cause problem? But in this case I should see the value of their session variable when i am echoing it but i just get an empty variable.
  17. included will execute any executable php code in that file. it does not just copies the html.
  18. p2grace, thank you for helping me. I just tested it. The session Id remains the same and I still loose the value for my session variable.
  19. PFMaBiSmAd , I am using a shared host. It makes sense. How do i set the session.save_path to point to a private folder within my account so that session.gc_maxlifetime that other scripts are using don't delete my session data files? p2grace , I am also going to run the test of session_id to see if it being reset.
  20. Index.php if($page=="2) { include 2.php here } else { include 1.php here } 1.php link to page 2: <a href='index.php?page=2'> if($subpage=="A") { include a.php here } elseif($subpage=="B" { include b.php here } else { include somwehting else here } 2.php link to page 1: <a href='index.php'> link to subpage A under page 1: <a href='index.php?page=1&subpage=A'> or <a href='index.php?subpage=A'>
  21. I am echoing the session variable. It works for a few minutes and then all of a sudden i loose the variable. It comes out empty.
  22. Yes, i have session_start(); on top of a page. It is actually one page and I am including other php files in that one page. The main page has all the design and other php pages are being called into that one page for example index.php?page=aboutus and index.php?page=contactus Depening on $page, I include the correct page in index.php and display it. session_start(); is on top of index.php
  23. Its a PHP App. Its is just storing some info in Session variables while I am jumping from page to page. I am not using Ajax, flash or anthing else, its pure PHP.
  24. Thanks, I will look at that script. I did google before opneiong a post here I found http://www.debianhelp.co.uk/mysqlscript.htm that I think will work. is it any good? I wanted to get a personal opinion from developers at PHPFreaks and see what everyone else is using.
  25. Does anyone know of a good PHP Based tool that would Backup my MySQL databases automatically on a given time inverval or maybe make it easy for me to back it up. I have 9 databases and total of 123 tables. It is a big hazzle to export the tables from PhpMyAdmin to back them up. Does anyone know of a good solution?
×
×
  • 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.