Jump to content

tqla

Members
  • Posts

    366
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

tqla's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. so your issue was concatenation. glad you got it working.
  2. Are you replacing customerservice@sentuamessage.com with a real email address?
  3. With godaddy I believe the "from" email has to actually exist.
  4. Each time the form appears you need to include a hidden field containing that records id. Something like this: <input type="hidden" name="id" value="<?php echo $id ?>"> Then change your query to: DELETE FROM $tbl_name WHERE id = $_POST['id']; Of course, format it in a way where you won't get errors. My formatting isn't like yours but you get the idea.
  5. tqla

    Array help

    Great suggestion! Thank you requinix! I made that change and it worked out.
  6. I have a session array that is added to by a form. Here it is when the form is submitted twice. It can grow larger and larger in a single session but the keys are always the same. What I need to do is check all the arrays to see if the key called Form matches a variable and if it matches then I will use that values in that particular array. array 0 => array 'Age' => string '20' (length=2) 'City' => string 'New York' (length= 'Your_name' => string 'Jim' (length=3) 'Friend1' => string 'Joseph' (length=6) 'Friend2' => string 'Waldo' (length=5) 'Form' => string 'help' (length=4) 1 => array 'Age' => string '25' (length=2) 'City' => string 'Sun Valley' (length=10) 'Your_name' => string 'Susan' (length=5) 'Friend1' => string 'Rick' (length=4) 'Friend2' => string 'Joe' (length=3) 'Form' => string 'welcome' (length=4) I know that I can do something like this to check the first one. $key = 'help'; $array = $_SESSION['array']; if($array[0]['Form'] == $key){ echo "We have a match"; } But how can I automatically cycle through [0], [1], and so on until I find a match? Thank you.
  7. Thank you all. SocialCloud, I'm glad it works in your (most likely later) version of PHP. Troubling that that sytax fails in some versions. PFMaBiSmAd and requinix, thank you for the 2038 info, the 32bit limitation it is indeed concerning.
  8. Hello. I do not need to know how to write this another way. I just am curious as to why this happens. Why does strtotime() print the expected result when I add 25 years: <?php $thedate = date('D M Y', strtotime("+25 year")); echo $thedate; ?> But it fails to print the expected result when I add 26 years. Instead it reads "Wed Dec 1969" <?php $thedate = date('D M Y', strtotime("+26 year")); echo $thedate; ?> Is it my version of PHP? Is there a 25 year limit? Does this happen on your system? Thanks.
  9. Oh I know, I had no problem echoing the entire array as expected. Thanks Barand.
  10. I was using nested foreach loops. Worked fine if I wanted to echo everything. But I did not. Solution: one foreach, $data[1] as $row.
  11. Yes I do Barand. Thanks again!
  12. Ah ha. Thanks jesirose.
  13. Thank you Barand. Can the loop be made to echo only "c d"?
  14. Obviously print_r prints this: Array ( [0] => Array ( [0] => a [1] => b ) [1] => Array ( [0] => c [1] => d ) [2] => Array ( [0] => e ) ) My question is how do do a foreach loop on this part: [1] => Array ( [0] => c [1] => d )
  15. Hello, I have an array called $data that looks like this. Array ( [0] => Array ( [0] => a [1] => b ) [1] => Array ( [0] => c [1] => d ) [2] => Array ( [0] => e ) ) I wish to do a foreach look on this part: [1] => Array ( [0] => c [1] => d ) When I do foreach ($data as $row)... I get everything in the array. When I do foreach ($data[1] as $row)... or foreach ($data['1'] as $row)... I get nothing. What is the proper way? Thanks.
×
×
  • 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.