Jump to content

KSquared

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

KSquared's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Actually.... One other thing... Shouldnt this then remove the requested value from the array? It seems to do nothing. [code]<?php $secProd =& $_SESSION['secProd']; $id = $_GET['id']; //the index of the array of which product to remove from array array_slice($secProd, $id, 1); ?>[/code]
  2. Thanks for the help!  Its working now.
  3. Hello All, Im having an issue with session vars. The first time a user lands on this page if the SESSION var 'secProd' is not set, go ahead and set it and add the product info. That works fine. The else is for when a user adds another product. I seem to lose $secProd data type as array. It comes back true, so I know the var itself exists but no longer an array.... any suggestions? [code] session_start(); $prod = $_GET['product']; $model = $_GET['model']; $action = $_GET['action']; if($action != "view"){ if(!$_SESSION['secProd']){ $secProd = $_SESSION['secProd'] = array(); $prodArray = array(); $add = "$model^$prod"; array_push($prodArray, $add); $_SESSION['secProd'] = array_push($secProd, $prodArray); }else{ $secProd = $_SESSION['secProd']; $prodArray = array(); $add = "$model^$prod"; array_push($prodArray, $add); array_push($secProd, $prodArray); } }[/code] Thanks
  4. Actually, I tried to parse $data but maybe Im parsing wrong. If I do a var_dump($data), or print_r($data)<-- this give blank white page, it simply renders the thankyou.htm page on the email_updates.php page (where the curl script lives), it does not redirect to the actual thankyou.htm page. However, i did the following with $info and it seems to work great, its returning correctly, even the error pages are now rendering correct with the correct errorcodes: [code]if($info['http_code']==200){ header("Location:".$info['url']); }else{ header("Location:".$info['url']); }[/code] Just want to be sure its ok to parse the $info instead of $data?
  5. Thanks xsist, You have no idea how long I have been trying to figure this out... I owe u big! I got a "success" return. So... to actually load the thankyou page I edited the following: [code]if ($info['http_code']==200) { header("Location:http://www.serenocanyon.com/thankyou.htm"); } else { header("Location:http://www.serenocanyon.com/error.htm"); }[/code] Even though, the email collection page should send back the "return url" (being the thankyou.htm page) and load it, it does not, which is why I edited the above. Does that seem correct?
  6. Hello All, Anyone help me with CURL? Here is the issue: I need to send some values through the post method from an interim page. The form is submitted, data written to csv (which is working fine), then I need to send the same data to an email collection page outside of my domain. The following script returns a page that says "Object Moved to here", "here" being a link to the actual page that needs to load. http://www.serenocanyon.com/thankyou.htm [code]$SubscribeDate = date("F j, Y"); $fname = $_POST['fname']; $lname = $_POST['lname']; $emailAdd = $_POST['emailadr']; $source = $_POST['source']; $thx = $_POST['thx'];    //http://www.serenocanyon.com/thankyou.htm $err = $_POST['err']; $usub = $_POST['usub']; $postArray = "First Name=".urlencode($fname)."&Last Name=".urlencode($lname)."&Email Address=".urlencode($emailAdd)."&Source=".urlencode($source)."&thx=".urlencode($thx)."&err=".urlencode($err)."&usub=".urlencode($usub)."&Subscribe Date=".urlencode($SubscribeDate); $url = "http://cl.exct.net/subscribe.aspx?lid=1220593"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postArray); $results = curl_exec($ch); echo $results; curl_close($ch);[/code] Why is this happening? Any help would be MUCH appreciated. Thanks, Keith
×
×
  • 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.