Jump to content

bubbasheeko

Members
  • Posts

    166
  • Joined

  • Last visited

    Never

Everything posted by bubbasheeko

  1. That's funny. Thanks for the preemptive response. I came back because I couldn't get my array variables to be read into the database. Turns out it was because of the quote issue. Thanks again!
  2. Figured it out.... Simply using $p->ipn_data['element'] produces the correct data. I think it didn't like the fact that I had it this way before: body .= "$p->ipn_data['element']"; Changing it to: body .= $p->ipn_data['element']; Worked. So that makes it a bit easier. Thank you for your help!
  3. $p->ipn_data is the variable. Sorry the first one was by memory. The second one was a typo (my bad). I have it open and working on it now so I just copied and pasted. Sorry for the confusion there. There is no output screen to see if print_r($p->ipn_data) works. This page is called behind the scenes so I wouldn't see the output. PayPal called for purchase -> PayPal processes the payment -> PayPal calls the IPN file at the time of the payment process(to update database or shoot off an email to the 'seller'.) Right now I am testing the output by using email. body .= "$p->ipn_data['element']"; The output is: Array['element']. It is an associative array ($key -> $value). There are no other arrays within this one - just one record at a time. Update...I did incorporate the print_r within the body of the email - result = '1'
  4. hmm...okay I didn't note the variable correctly. In the foreach loop that built the array it was being stored in $p->data. Now...if I try you suggestion $p->data['element']; I receive the following output: Array['element'] I can not wait to figure this out so I don't have to ask for help again...I knew when I was in college I should not have missed the day we discussed arrays....lol Thanks for the help.
  5. Hi Crayon, Well damn! Why didn't I think of that...too many projects on the go - causes confusion :S I know what the element keys are. I will take your suggestion here, seeing it will most definitely work. Thanks for your helpful response on this!
  6. Sorry, I provided as much information I felt comfortable providing seeing it is in regards to a payment processor. 1. PayPal IPN. $data. It's an array, it has what ever PayPal sends via $_POST to the ipn processing app that this is part of. I do not need all of the information, only about 10 of the 25-30 items it sends back. 2. The array being created is an associative array: The $_POST data is what comes from the PayPal IPN. foreach ($_POST as $field=>$value) { $data["$field"] = $value; $post_string .= $field.'='.urlencode(stripslashes($value)).'&'; } 3. "INSERT ... ON DUPLICATE KEY UPDATE" is the title of the mysql function I will need to use because there will be duplicate key records and I want those to be updated rather than a new record created. 4. Primary key would be the transaction number from the PayPal IPN. Basically I know how I want it and how to do it, except for grabbing the records out of the array that I need. I would assume the following: foreach ($p->ipn_data as $key => $value) { if($key == 'fieldname' || $key == 'fieldname2' || $key == 'fieldname3' || $key == 'fieldname4') { NOW SHOULD I BUILD A NEW ARRAY WITH THE STRIPPED INFORMATION? OR IS THERE A WAY THAT I COULD BUILD THE QUERY HERE TO BE USED AFTER THE FOREACH? } }
  7. I seldom use arrays, but I have been left with alternative on this one. So I have an array: foreach ($data as $key => $value) { Doing whatever here. } Inside the array are about 20 different fields sent from a previous page. I only want like 5 of them. So say...there is first_name, last_name, address, hphone, email as the 'field' names. I want to put the five of those fields into my database and ignore the rest. How would I go about doing that? Oh...and I should add that the need to use "INSERT ... ON DUPLICATE KEY UPDATE" is important as there may be updates passed to this app that would need the original item updated and not a new record created.
  8. Yes, you said the CSV fields are being separated by a comma. Your PHPMyAdmin configuration shows a semi colon. That would be the one thing that stands out right now.
  9. + Enter the results of one of the php queries I provided into a database.
  10. This should be posted here: http://www.phpfreaks.com/forums/index.php/board,5.0.html
  11. That's the thing, you can't always get their real IP address. That is why we let you know it isn't the best option. I will give you the info anyway $ip =@$REMOTE_ADDR; If php.ini on your server has register_global set to the off position then you will have to do it a different way. $ip = $_SERVER['REMOTE_ADDR']; Good luck!
  12. Corbin!! Beating me to it... lol Eval() would work, but after testing - I found that it didn't like an echo statement in it. It would still print the word 'echo'.
  13. What happens if you temporarily remove this section: onkeyup="Javascript: document.getElementById('usercheck').innerHTML = '<image src=\'game/check.php?check=user&username='+getElementById('playername').value+'&s='+getElementById('s').value+'\' />';"
  14. ..hence why I said it wasn't a good idea
  15. that depends on one thing - What is the package that is being downloaded? PHP app? Flash app? Word documents?
  16. If they are purchasing the items to download there is an easier way than what you are suggesting. Only allow them to download the package once or twice without approval from the person looking after the website. The download will trigger a 'marker' in the database to say it was downloaded (and how many times). If they attempt to download a purchased item again outside of you 1 or 2 download limit, it will trigger an approval email to the website admin or who ever is looking after it. If they approve ( you will need to create a page that will remove the marker for that 'client' and include the link in the email), click on the marker removal link in the email. Clear the marker or set it back to 1 (if you choose to allow at least 2 downloads without approval). That would be a basic deterrent. I wouldn't suggest to use IP addresses. Dynamic addresses (usually dial up) change to frequently to make an IP solution feasible. Static IP addresses do not change that frequently, but when they do they may not even start with the same first three numbers. The above may be the best solution.
  17. Why not simply make one field on your table labeled 'rating'. Only enter the rating number into that field and let your website code do the rest.
  18. $result = mysql_query("UPDATE video SET viewnumber='2'"); That's what you need to do based on how you described it. It doesn't matter what viewnumber is, you just want to increase it by two.
  19. Hey Exoon, Great! Just remember to mark the thread as resolved!
  20. Our department head was a college staff member who had been trying to tell IT that their system was not secure. The department head was standing right next to us, along with one of the deans LOL. Nothing like hacking your college network with the sanction of its staff lol
  21. <iframe src="http://www.whateverthepage.com?option=" . <? echo $_POST['whatever']; ?> . ""> Then in the iframe use $_GET to grab the variable data for the iframe. I think I read somewhere that you should use $_REQUEST['whatever'], but I am not positive on that one.
  22. Here this will just simplify it if the visitors browser has javascript enabled: <script type="text/javascript"> if (top.frames.length!=0) { if (window.location.href.replace) top.location.replace(self.location.href); else top.location.href=self.document.href; } </script> <noscript>Your browser is not javascript enabled or it has been disabled. Javascript is required to see this page.</noscript> If a frame is detected it will remove it and place your site in the parent window.
  23. I remember back in college I was able to download two tools from the school computer I was using and have an admin account in a matter of minutes....that was my response to their "our systems are secure, good luck trying comment". The department I was working in part time challenged the IT department when they made that comment. They were not amused lol
  24. That does not work - tested that today and the parent.document setting will affect the content of the iframe only. Strange behavior considering that same tag is used to check the url of the parent page.
×
×
  • 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.