Jump to content

jessica_m88

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by jessica_m88

  1. Hello, The company I work for recently moved all our content onto a new platform and one of our web applications was a contact information search form. It is a php form calling upon a dataEntry.php form to display results because our old platform didn't allow us to use PHP myAdmin. Anyway, we got the error msg that the passwords were wrong, so I updated all the user and password information in our code to call upon the new platform but now when we try to search for something it constantly says 'No Results'. For some reason the data isn't being retrieved and I can't figure out why. Would someone be interesting in PMing or G-talking me and working through the issue with me, since the code is more than I can post on here?
  2. Hello. Basically the issue I am having is my feedback form is not grabbing the Company Name and ID from the URL. I have the php code set in place where it's supposed to post, but it's not getting it. Can someone please help me out? I'm pretty new with php, so I'm kind of at the brink of my knowledge. Thanks, Jess. <?php //Modified because only email is required //if (empty($_POST['name']) || empty($_POST['email']) || empty($_POST['comments'])) { if (empty($_POST['email'])) { $error_msg .= "E-mail is a required field. \n"; } elseif (strlen($_POST['name']) > 15) { $error_msg .= "The name field is limited at 15 characters. Your first name or nickname will do! \n"; } elseif (!ereg("^[A-Za-z' -]*$", $_POST['name'])) { $error_msg .= "The name field must not contain special characters. \n"; } elseif (!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,6})$",strtolower($_POST['email']))) { $error_msg .= "That is not a valid e-mail address. \n"; } elseif (!empty($_POST['url']) && !preg_match('/^(http|https):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(\d+))?\/?/i', $_POST['url'])) $error_msg .= "Invalid website url."; if ($error_msg == NULL && $points <= $maxPoints) { $subject = "Feedback for " . $_POST['Company']; $message = "You received this e-mail message through your website: \n\n"; foreach ($_POST as $key => $val) { $message .= ucwords($key) . ": $val \r\n"; } $message .= 'IP: '.$_SERVER['REMOTE_ADDR']."\r\n"; $message .= 'Browser: '.$_SERVER['HTTP_USER_AGENT']."\r\n"; $message .= 'Spam points: '.$points; if (strstr($_SERVER['SERVER_SOFTWARE'], "Win")) { $headers = "From: $yourEmail \r\n"; $headers .= "Reply-To: {$_POST['email']}"; } else { $headers = "From: $yourWebsite <$yourEmail> \r\n"; $headers .= "Reply-To: {$_POST['email']}"; } if (mail($yourEmail,$subject,$message,$headers)) { echo '<p>Thank you for taking the time to send us your feedback. Your comments are appreciated and help us provide the most current and accurate information possible.</p> <p>If you require further assistance, please visit our <a href="http://www.domain.com/" target="_blank">contact us</a> page.</p>'; $sentmail = 1; echo ' <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("analyticscode"); pageTracker._setDomainName(".domain.com"); pageTracker._trackPageview(); </script> '; } else { echo '<p>Your mail could not be sent this time.</p>'; } } } function get_data($var) { if (isset($_POST[$var])) echo htmlspecialchars($_POST[$var]); } ?> <?php foreach( $_POST as $checkbox ){ echo $checkbox .'<br />'; $checkbox = array("WebsiteLinkIsNotAccurate", "TelephoneNumberIsNotAccurate", "FaxNumberIsNotAccurate", "CompanyIsOutOfBusiness", "CompanyIsNoLongerAtThisLocation", "CompanyDoesNotProvideTheProductOrServiceAsFeatured", "Other(PleaseExplainBelow)"); } ?> <?php // DISPLAY ERROR MESSAGE - CHECK TO SEE IF USER HAS SUBMITTED THE FORM SUCCESSFULLY if ($error_msg != NULL) { echo '<p><strong style="color: red;">ERROR:</strong><br />'; echo nl2br($error_msg) . "</p>"; } if($sentmail == 0){ ?> <form id="feedback" name="feedback" method="post" action="feedback.php" onSubmit="return CheckForm()"> <noscript> <p><input type="hidden" name="nojs" id="nojs" /></p> </noscript> <input type="hidden" name="CompanyID" id="CompanyID" value="<?php echo $_POST['companyid']; ?>"> <input type="hidden" name="Company" id="Company" value="<?php echo $_POST['companyname']; ?>"> <p><strong>If you have different information about <u><?php echo $_POST['companyname']; ?></u>, or were unable to contact them, please let us know by completing the form below.</strong></p> ...
×
×
  • 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.