Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. Code seams ok.. you say each page runs a query, are their more then 1 query ? are you running the same query more than once per page .. we really need some more info..
  2. try class parent { var $config = ""; function initiate() { $this->config = "hello world"; } } class child extends parent { function display() { $content = $this->config; return $content; } } //$parent = new parent; //removed $child = new child; //$parent->initiate(); //removed $child->initiate(); $content = $child->display(); echo $content; EDIT also this should be in the OOP section!
  3. try ^(??:\d{1,3}\.){3}\d{1,3}(?:\z|,?\s+))+ or use effigy code (better solution)
  4. <?php class paypal_class { var $last_error; // holds the last error encountered var $ipn_log; // bool: log IPN results to text file? var $ipn_log_file; // filename of the IPN log var $ipn_response; // holds the IPN response from paypal var $ipn_data = array(); // array contains the POST values for IPN var $paypal_url; // You need to ADD this var $fields = array(); // array holds the fields to submit to paypal function paypal_class() { // initialization constructor. Called when class is created. $this->paypal_url = 'https://www.paypal.com/cgi-bin/webscr'; //NO Var for the line above
  5. Nope..(not what i have found) i think your thinking of the vbscript compression for uploads!! only worked on IE (was poop)
  6. looks like "process" isn't being set in the form... try print_r($_POST); at the top of the code and post the results here
  7. what about the manual! zlib & wrappers compression & ob_gzhandler
  8. Seams OK here, Note the changes! <?php //New String $theString = "hi, my name is blaha blah, i likeeeeeeeeeeeeeeeeeeee to play footbal, adios, byeeee"; $max = 10; //changed from 25 to 10 $start = 6;//changed from 17 to 6 $end = 3; //changed from 5 to 3 $words = explode(" ",$theString); foreach($words as $word) { $sLength = strlen($word); if($sLength > $max) { $NewString = substr($word, 0, $start); $NewString .= "..."; $NewString .= substr($word, ($sLength-$end), $end ); }else{ $NewString = $word; } echo $NewString." "; } ?> output
  9. the above has always worked for me.. !
  10. only problem i can see is your missing var paypal_url; also move the donate1 function to the bottom !
  11. maybe this <?php $theString = "1234567 8901234578901234567890123457890123456 7890123457890"; $max = 25; $start = 17; $end = 5; $words = explode(" ",$theString); foreach($words as $word) { $sLength = strlen($word); if($sLength > $max) { $NewString = substr($word, 0, $start); $NewString .= "..."; $NewString .= substr($word, ($sLength-$end), $end ); }else{ $NewString = $word; } echo $NewString." "; } ?>
  12. try this, its a basic check nothing special! <?php if (isset($_POST['email'])) { header("Location: http:\\whatever.com"); } require_once('libs/Smarty.class.php'); $smarty = new Smarty; $smarty->compile_check = true; $smarty->debugging = false; if (isset($_POST['action']) && $_POST['action'] == 'Submit request') { $body = ''; $body .= 'How d......
  13. what about this <?php $theString = "123456789012345789012345678901234578901234567890123457890"; $max = 25; $start = 17; $end = 5; $sLength = strlen($theString); if($sLength > $max) { $NewString = substr($theString, 0, $start); $NewString .= "..."; $NewString .= substr($theString, ($sLength-$end), $end ); }else{ $NewString = $theString; } echo $NewString; ?> output EDIT or change 60 to 25 ### Shorten textual part if need be. $url_text = strlen($url) >= 25 ? (substr($url, 0, 20) . '...' . substr($url, -10, 10)) : $url ;
  14. Or addslashes
  15. you reading the WHOLE thing
  16. I know.. i was saying the compression swaps its.. so check your not compressing it.. if your not compressing it, then you are doing something else wrong!
  17. it is simple!! class testClass { funtion TestFunction() { echo "hello"; } } OR Use Extend Old POST
  18. so you need to work out the paper size, if word wrap is on and the font size and the line spacing etc etc also i assume you are using M$ words ability to convert the HTML to a doc..
  19. PDFLib Compression converts CMYK to RGB for web display! really need to see some code!!
  20. try this $to = "someone <some@email>"; $subject = "You've got mail!"; $message = "Hello someone."; $headers = "From: me@mysite.com\n"; // I suggest you try using only \n $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "Reply-To: me <me@mysite.com>\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSmail-Priority: High\n"; $headers .= "X-mailer: My mailer"; mail ($to, $subject, $message, $headers)
  21. Nothing but you need to start a table first
  22. Gezzz OK heres the full example <?php $formpassword = "aaaA2aa"; //Works $formpassword = "aaaaaa"; //Fails $valid = (preg_match('/\A(?=\S*?[A-Z])(?=\S*?[a-z])(?=\S*?[0-9])\S*\z/', $formpassword)>0)?true:false; if (!$valid) { $error .= "<span class='warning'>$formpassword ERROR: Failed check for required symbols in password. Please adhere to the specifications given.</span><br />"; } echo $error; //Added ?>
  23. can you post the array from the print_r($_POST)!
×
×
  • 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.