Jump to content

smatt454

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by smatt454

  1. Well I tried this $vendor[$x] = $_POST["vendor$x"]; $vendorsplit = explode ("\n",$vendor[1]); setcookie("vendorname$x",$vendorplit[0]); Just to clear it up, there is obviously a loop in both of these instances, but for simplicity sake I just tried to explode the first varriable. Please note that I am currently getting the value of $_POST["vendor$x"] and putting it into a cookie called vendor$x. In the above code, the program does run through the loop, and gets the POST values correctly. However, when I try exploding vendor[1] (which contains the name, address, etc of the first vendor) and then setting the cookie vendorname$x as the first value in the array, the cookie is not set. Any ideas?
  2. Hello. I have a question I believe should be fairly straight forward. Here's a little of my code, I believe seeing it first should help make my question more understandable. $vendor[$x] = $_COOKIE["vendor$x"]; if ($vendor[$x] == "") $vendor[$x] = "Vendor name:\nAddress:\nCity:\nState:\nZip:"; <form name="request" action="./request.php" method="POST"> <textarea name="vendor'.$x.'" rows="4" cols="30">'.$vendor[$x].'</textarea> <input type="submit" name="submit" value="Submit"> </form> So basically, in request.php I want to split the $_POST value of vendor. I want to look for the \n, and separate the values into Name, Address, City, State, and Zip. I've never had to split cookies in an application, so any help would be greatly appreciated.
×
×
  • 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.