Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About cartimus

  • Rank
  1. What is the syntax for specifying the ID attribute of HTML elements - soemthing like 'document.body.id ? If I wanted to retrieve the 'id=' value of the body element (assuming it is unknown), what statement would handle that? For example, if each of my pages had a unique ID for the BODY tag, so I can write a common function that does different things depending on which page the user loaded, how would I do this?
  2. The virtual app's IPN listener opens a SSL connection using 'fsockopen()': $fp = fsockopen('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30); ...the only thing I'm unclear of is where do the '$errno' and '$errstr' values come from? Even the PHP Manual fsockopen() examples use the same apparently previously undeclared variables...does this function by default look for PHP errors and plugs in the values for these arguments if they exist?
  3. The virtual app code assumes Magic Quotes is disabled and uses mysqli_real_escape_string() directly...but my host provider has Magic Quotes enabled, so for that environment should I replace every mysqli_real_escape_string() statement with the 'escape_data()' function defined in 'mysql.inc.php'? For the IPN listener, if modified to process other fields, how would $_POST['payment_date'] be made safe to use in a query, or is it necessary for dates? Also for the IPN listener, is there a way to run the entire $_POST[] array from PayPal at once (i.e. something like 'escape_data($_POST[])', or each individual value you want to retain should be handled individually?
  • Create New...