Jump to content

sixseven

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sixseven's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi there, I have a simple form online set up to email contact info and and some selections to an inbox. Simple enough. I now want the back end php code that emails me that info to also send my email marketing account the contact information. I was told to look into cURL, which I have been, and can't seem to figure it out. I get all the field names and place them into variables. I was given the string in the variable $url to use in order to send the info to our email lists. I tried using the code below but it didn't work. I'm having a hard time understanding how to use cURL and was curious if anyone could shed some light. Many thanks to anyone with answers. $EmailFrom = Trim(stripslashes($_POST['fields_email'])); $FirstName = Trim(stripslashes($_POST['fields_fname'])); $LastName = Trim(stripslashes($_POST['fields_lname'])); $Street1 = Trim(stripslashes($_POST['fields_address1'])); $Street2 = Trim(stripslashes($_POST['fields_address2'])); $City = Trim(stripslashes($_POST['fields_city'])); $State = Trim(stripslashes($_POST['fields_state'])); $Zip = Trim(stripslashes($_POST['fields_zip'])); $Country = Trim(stripslashes($_POST['fields_country'])); $url = "https://app.email.com/icp/signup.php?fields_email&fields_fname&fields_lname&fields_address1&fields_address2&fields_city&fields_state&fields_zip&fields_country&listid=XXXXXX&specialid:XXXXXX=SCCG&clientid=XXXXXX&formid=XXXX&reallistid=1&doubleopt=0&redirect=http://www.email.com/www/signup/thanks.html&errorredirect=http://www.email.com/www/signup/error.html"; $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); $result = curl_exec($ch); curl_close($ch);
  2. It looks like with a little messing around from what all of you posted, I fixed the problem. There was another spot that I missed that was passing url info. I took off the urldecode on the GET value and urlencoded another and I'm set. I now have a much better understanding of encode and decode. Thanks for all of the help.
  3. Strange. I tried that and it still doesn't display the ampersand and anything after the ampersand. Looking at your code it seems to make sense, but it still doesn't work. Any ideas as to why this might be happening?
  4. THanks for the reply. Would I write the code like this: <?php echo urldecode(htmlentities($_GET['gallery'])); ?> I tried it and it didn't work.
  5. Hello, I'm pretty new to php and have a small problem I can't figure out. I have passed some copy (john & mary) from a small form to a url with php (i used urlencode). The code in the url looks like this john+%26+mary. My problem is, how do I display the %26 as an actual ampersand (&) on the html page? Here is the snippet of code that I am currently using to display the names. <?php echo htmlentities($_GET['gallery']); ?> I have searched and searched and can't find anything to figure this out. Any help would be great. Thanks.
  6. Thanks Bricktop. The strtolower() was exactly what I needed.
  7. I've researched and tried a number of things but can't figure this one out. When this if statement receives 'gallery' from the url I don't want it to be case sensitive. Currently a person would have to type the name exactly as I have it below in order for the correct image to show. I've tried playing around with the i modifier but it's not coming together. Any help would be great. Thanks. if($_GET['gallery']=="arte x arte") { $userImage = "arte_x_arte.jpg"; }
  8. Hello, Fairly new to PHP and was curious if someone might know how to solve a fairly simple request. I am currently passing the name of an end user (who types their name in a form field) to a URL which is then passed along and placed into an html page to personalize the page for them to print. Is there a way that I could use PHP to use a specific image for a specific name typed in the field? Example would be: Name typed in field: Bob Picture used: Baseball OR Name typed in field: Alison: Picture used: Cat Below is some of the coder snippets I am using. Here is the code from the form that the end user types in their name: <form id="form1" name="form1" method="post" action="name_of_user.php"> <label>Gallery Name:<br /> <input type="text" name="name" id="name" /> </label> <br /> <label> <input type="submit" name="Submit" id="Submit" value="Submit" /> </label> </form> Here is the code that receives the post from above file: <?php $Name = Trim(stripslashes($_POST['Name'])); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=path to file/comp_pass_exhibitor.php?name=$Name\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=path to file/comp_pass_exhibitor.php?name=$Name\">"; } ?> ________Below is code from the html page I want personalised_______ Here is the bit of code that places the name in the html page: <p><strong> <span style="text-transform:uppercase;"><?php echo $_GET['name']; ?></span> <br> some text that doesn't change</strong> </p> Here is the bit of code for the image on the html page: <td> <img src=" What would go here " width="140" height="109" align="left"> </td> Any help would be 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.