Jump to content

dennismonsewicz

Members
  • Posts

    1,136
  • Joined

  • Last visited

Everything posted by dennismonsewicz

  1. Is there anyway to write a cron job to back up a single mysql db table? I have found several scripts to backup an entire database but I just need to backup a single table
  2. phpeditor is a great program too but the last free edition was like 2006 or something there is another one called pspad
  3. both should have the capability. if they don't do what you are looking for I would just mess around in the options and find what you are looking for.
  4. I use notepad++ it works pretty well... Dreamweaver is also another good one
  5. <?php $help_db =& JFactory::getDBO(); $msgid = $_GET['msgid']; $carrier = $_GET['carrier']; if (!$msgid || $msgid == '') { $msgid = 'START_NEW_CLAIM'; } if(isset($carrier)) { switch($carrier) { case "number1": $callNumber = "1-800-555-5555"; $link = "http://www.google.com"; break; case "number2": $callNumber = "1-800-111-1111"; $link = "http://www.yahoo.com"; break; case "number3": $callNumber = "1-800-222-2222"; $link = "http://www.msn.com"; break; case "number4": $callNumber = "1-800-333-3333"; $link = "http://www.aol.com"; break; } } $help_db->setQuery("SELECT page, sorter, question, answer, published FROM #__db_name WHERE page = '" . $msgid . "' ORDER BY sorter"); $help_rows = $help_db->loadObjectList(); foreach($help_rows as $row) { if ($row->published == 1) { echo "<p>"; echo "<strong>".$row->question."</strong><br/>"; echo $row->answer; echo "</p>"; } } ?> SQL string ('msgid_var here',2,'The data I entered is correct. How do I continue?','$callNumber',1),
  6. I have a sql db that contains a variable ($callNumber) and in my PHP I have a switch that sets that var but when the statement is printed out on the page it is printing out $callNumber instead of the actual value of the variable... any ideas?
  7. It seems as if your script is running the default case because it cannot find any other one
  8. here is an example for image thumbnails http://phpthumb.sourceforge.net/
  9. I actually found a good script online for auto thumbnailing... mine worked on the fly though verses creating it upon upload. Try google for scripts like this..
  10. I would look into using WordPress or Drupal. Joomla is a horrible CMS. You have to do like 6 steps to accomplish one task. Your easiest option, IMO, is WordPress... although I am an avid believer in building your own CMS
  11. I figured out my problem... I used the HTML meta tag of refresh and it works like a charm
  12. Is there anyway in PHP to download or open a pdf without the use of the header function? Maybe this could be accomplished using javascript or some javascript library
  13. thanks i am bookmarking that stuff now... i understand that writing functions is a quicker way of doing things and I would love to learn. So all help is greatly appreciated
  14. thanks. what is the difference between public and private?
  15. I am trying to study more and more OOP and I was wondering if someone could explain the use of classes and not so much how functions work but an example would be nice of using em. Thanks
  16. tested this in on a Linux box and everything worked perfectly... Its the hosting company I am using!
  17. Well the md5 is a sort of encryption while the @ symbol in front of the variables will cause them to not show errors so you won't notice them being there. If this was placed at the top of some of your files (possibly more) I would definitely tighten up security on your web server
  18. When you submit the information to the PHP file.. the following displays Status: < Error: < Which according to yourpay.com's support line is because the .PEM file cannot be found but the .PEM file is in the same directory as all of the rest of the files... so I am not sure what is happening
  19. I am trying to setup an ecommerce website and my client has purchased a CC processing gateway through yourpay.com and I am trying to follow their documentation for setting up their PHP API integration but I am confused as all get out. the example form code they give <?php echo"<html><head><title>PHP_FORM_MIN.php LinkPoint Sample </title></head><body><br>"; /* <!--------------------------------------------------------------------------------- * PHP_FORM_MIN.php - A form processing example showing the minimum * number of possible fields for a credit card SALE transaction. * * This script processes form data passed in from PHP_FORM_MIN.html * * * Copyright 2003 LinkPoint International, Inc. All Rights Reserved. * * This software is the proprietary information of LinkPoint International, Inc. * Use is subject to license terms. * This program is based on the sample SALE_MININFO.php Depending on your server setup, this script may need to be placed in the cgi-bin directory, and the path in the calling file PHP_FORM_MIN.html may need to be adjusted accordingly. NOTE: older versions of PHP and in cases where the PHP.INI entry is NOT "register_globals = Off", form data can be accessed simply by using the form-field name as a varaible name, eg. $myorder["host"] = $host, instead of using the global $_POST[] array as we do here. Passing form fields as demonstrated here provides a higher level of security. ------------------------------------------------------------------------------------> */ include"lphp.php"; $mylphp=new lphp; # constants $myorder["host"] = "hostname"; $myorder["port"] = "postname"; $myorder["keyfile"] = ".PEM-file"); # Change this to the name and location of your certificate file $myorder["configfile"] = "store-number"; # Change this to your store number //$myorder["result"] = "GOOD"; # form data $myorder["cardnumber"] = $_POST["cardnumber"]; $myorder["cardexpmonth"] = $_POST["cardexpmonth"]; $myorder["cardexpyear"] = $_POST["cardexpyear"]; $myorder["chargetotal"] = $_POST["chargetotal"]; $myorder["ordertype"] = $_POST["ordertype"]; if ($_POST["debugging"]) $myorder["debugging"]="true"; # Send transaction. Use one of two possible methods # // $result = $mylphp->process($myorder); # use shared library model $result = $mylphp->curl_process($myorder); # use curl methods if ($result["r_approved"] != "APPROVED") // transaction failed, print the reason { print "Status: $result[r_approved]<br>\n"; print "Error: $result[r_error]<br><br>\n"; } else // success { print "Status: $result[r_approved]<br>\n"; print "Transaction Code: $result[r_code]<br><br>\n"; } # if verbose output has been checked, # print complete server response to a table if ($_POST["verbose"]) { echo "<table border=1>"; while (list($key, $value) = each($result)) { # print the returned hash echo "<tr>"; echo "<td>" . htmlspecialchars($key) . "</td>"; echo "<td><b>" . htmlspecialchars($value) . "</b></td>"; echo "</tr>"; } echo "</TABLE><br>\n"; } ?> </body></html> the HTML form <!--------------------------------------------------------------------------------- * PHP_FORM_MIN.html - A form processing example showing the minimum * number of possible fields for a credit card SALE transaction. * * This page passes form data passed to the script PHP_FORM_MIN.php. * * Copyright 2003 LinkPoint International, Inc. All Rights Reserved. * * This software is the proprietary information of LinkPoint International, Inc. * Use is subject to license terms. *--> <html><head><title>PHP_FORM_MIN.html sample program</title></head><body> <br> <form name="form1" method="post" action="PHP_FORM_MIN.php"> <br><br> <table> <tr> <td align="right">ordertype</td> <td><input name="ordertype" value="SALE"></td> </tr> <tr> <td align="right">amount</td> <td><input name="chargetotal" value="9.99"></td> </tr> <tr> <td align="right">cardnumber</td> <td><input name="cardnumber" value="4111111111111111"></td> </tr> <tr> <td align="right">cardexpmonth</td> <td><input name="cardexpmonth" value="01"></td> </tr> <tr> <td align="right">cardexpyear</td> <td><input name="cardexpyear" value="05"></td> </tr> <tr> <td align="right"> debugging</td> <td><input type=checkbox name="debugging"></td> </tr> <tr> <td align="right"> verbose output</td> <td><input type=checkbox name="verbose"></td> </tr> <tr> <td> </td> <td> <input type="submit"></td> </tr> </table> </form> </font></body></html> I am not understanding how all of this is supposed to work... here is some of their instructions from their website Build the XML string yourself and send it directly to the secure payment gateway. This option requires a PHP version higher than 4.0.2 and cURL support to be compiled into PHP. (This is the default setup for Red Hat® Linux® server installations.) This option does not use the PHP module to build the XML string. You need to manage your own XML output. This option is demonstrated in the PHP sample program pass_xml_direct.php. 2. Use cURL (with OpenSSL) along with the lphp.php module. Use this option with older versions of PHP or where PHP has not been compiled to support cURL. This object accepts either hash-style input or XML. 3. Use the PHP built-in cURL methods along with the lphp.php module. This is the easiest option to use. It requires PHP version higher than 4.0.2 and that cURL support is compiled into PHP. (This is the default setup for Red Hat Linux server installations.) This option accepts either hash-style input or XML. 4. Use the lphp.php module with the provided shared libraries and OpenSSL. This option requires the provided shared libraries libspssl.so and liblphp.so to be installed, and that you have OpenSSL libraries built with shared object support on your web server. This option uses the lphp.php module to accept either hash-style input or XML. It is recommended for users with admin privileges on their server to correctly install the shared libraries. FreeBSD 3.3 PHP users should not attempt to use the shared libraries option. Shared libraries are not supported for FreeBSD 3.3 with PHP. 5. Build the XML stream yourself and send it through cURL or the shared libraries provided with the PHP module. This option requires the provided shared libraries libspssl.so and liblphp.so to be installed, and that you have OpenSSL libraries built with shared object support on your web server. This option is demonstrated in the PHP sample program pass_xml_lib.php. To determine whether PHP cURL support is installed, enter the command php -m in the command prompt window. If anyone can shed some light into my world, I will be greatly appreciative. I have contacted their support but its so hard to get anyone to answer back and in a timely manner. Thanks!
  20. look into Ajax or using the javascript library of jQuery... it has amazing tools to do stuff like this
  21. I am wanting to display a password but say like the first 4 letters in the password (not necessarily the first 4, could be the last 4) I want to display as asterics... anyway of doing this?
×
×
  • 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.