Jump to content

harshadmethrath

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by harshadmethrath

  1. yes how to send each drop downs separate emails. spa to spa@, marketing to marketing@ etc.,
  2. Hi heres the form to take a look http://jamaicainn.com/contact.php the contact form basically is now sending all the information to the database of our external partner. I have a field "Regarding" which when selected the form information goes to the respected departments for ex., Spa goes to spa@jamaicainn.com heres the code I wrote. which doesnt seem to work <?php if ($regarding == 'Human Resources'){ // form action email(sophiaw@jamaicainn.com, $subject, $message) then redirect to } elseif ($regarding == 'Guest Relations'){ // form action email(shickling@jamaicainn.com@jamaicainn.com, $subject, $message) } elseif ($regarding == 'Spa'){ // form action email(spa@jamaicainn.com, $subject, $message) } elseif ($regarding == 'Marketing'){ // form action email(tina@jamaicainn.com, $subject, $message) }elseif ($regarding == 'Accounts'){ // form action email(debra.freak@jamaicainn.com, $subject, $message) } elseif ($regarding == 'Reservations') { // form action post(http://www.NavisTechnologies.info/Narrowcast2005/ELM/ELMContactPost.aspx) } ?> <p><form name="form1" method="post" action="http://www.NavisTechnologies.info/Narrowcast2005/ELM/ELMContactPost.aspx"> <table width="90%" border="0" cellpadding="3" cellspacing="3"> <tr> <td width="30%"> <input name="account" value="15340" type="hidden" /> <label for="FirstName">First name*</label></td> <td><input type="text" name="FirstName" id="FirstName" required></td> </tr> <tr> <td><label for="LastName">Last name*</label></td> <td><input type="text" name="LastName" id="LastName" required></td> </tr> <tr> <td><label for="EmailAddress">Email*</label></td> <td><input type="email" name="EmailAddress" id="EmailAddress" required></td> </tr> <tr> <td><label for="HomePhone">Phone</label></td> <td><input type="tel" name="HomePhone" id="HomePhone"></td> </tr> <tr> <td><label for="regarding">Regarding</label></td> <td><select name="regarding" id="regarding"> <option><p> Reservations</p></option> <option><p> Guest Relations</p></option> <option><p> Spa</p></option> <option><p> Marketing</p></option> <option><p> Human Resources</p></option> <option><p> Accounts</p></option> <option><p> Groups/Weddings</p></option> </select></td> </tr> <tr> <td><label for="CheckInDate">Check in date</label></td> <td><input name="CheckInDate" type="Date" id="CheckInDate"><a href="javascript:openCalendar('CheckInDate')"><img src="http://jamaicainn.com/calendar.gif" width="20" height="20" border="0" /></a></td> </tr> <tr> <td><label for="CheckOutDate">Check out date</label></td> <td><input name="CheckOutDate" type="Date" id="CheckOutDate"><a href="javascript:openCalendar('CheckOutDate')"><img src="http://jamaicainn.com/calendar.gif" width="20" height="20" border="0" /></a></td> </tr> <tr> <td><label for="Date">Comments</label></td> <td><textarea name="Message" id="Message" cols="30" rows="4"></textarea></td> </tr> <tr> <td> </td> <td><input name="send" type="submit" class="submit" id="send" value="SUBMIT"></td> </tr> </table> </form> <script language="javascript" type="text/javascript"> function openCalendar(FormElement){ var calendarwindow; url = "calendar.html?formname=form1&formelement=" + FormElement; calendarwindow = window.open(url,"calendar","toolbar=no,width=200,height=144,top=50,left=50,status=no,scrollbars=no,resize=no,menubar=no"); calendarwindow.focus(); } </script> Any helps appreciated Thanks
  3. hi the reply works fine, but when i recieve the form, it still pulls the last email created in the server. i have attached a jpeg to show [attachment deleted by admin]
  4. if i hit the reply button it replies to the sender. but when iam recieving it.it shows as received from "the last email created in the server"
  5. it still hasn't changed it... doesn't seem to work
  6. i have not hand coded php. iam using an online service to create it. all i need for this to do is make me reply to the sender. can u include the header that allows that. it would be a great help
  7. what line of code should i add in order to be able to reply to the sender of contact form. right now its showing the last email created in the server. heres the code <?php $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/")); // Checkbox handling $field_1_opts = $_POST['field_1'][0].",". $_POST['field_1'][1]; mail("randy@reefsclub.com","Invitation - Form submission","Form data: rooms: $field_1_opts First Name: " . $_POST['fname'] . " Last Name: " . $_POST['lname'] . " Your Email: " . $_POST['email'] . " Phone Number: " . $_POST['pnumber'] . " Request your arrival date: " . $_POST['field_2'] . " Request your departure date: " . $_POST['field_3'] . " Please send me an ownership package: " . $_POST['field_4'] . " ",$headers); include ("confirm.html"); ?>
  8. I want to be able to reply to the sender of the information ( the guy who fills the form online ). your help is much appreciated. here's the code <?php if(isset($_POST['submit'])) { $from = 'From: contactform@nisbetplantation.com'; $to = "reservations@nisbetplantation.com"; $subject = "Website Contact Form"; $name_field = $_POST['name']; $email_field = $_POST['email']; $address_field = $_POST['address']; $address2_field = $_POST['address2']; $city_field = $_POST['city']; $state_field = $_POST['state']; $zip_field =$_POST['zip']; $company_field =$_POST['company']; $IATA_field =$_POST['IATA']; $phone_field =$_POST['phone']; $fax_field =$_POST['fax']; $mail_from="$email"; $response1_field =$_POST['response1']; $areacode_field =$_POST['areacode']; $comments_field =$_POST['comments']; $body = "From: $name_field\n E-Mail: $email_field\n Address:\n $address_field Address2:\n $address2_field City:\n $city_field State:\n $state_field Zip:\n $zip_field Company:\n $company_field IATA:\n $IATA_field Phone:\n $phone_field Fax:\n $fax_field Visited Resort:\n $response1_field Area code:\n $areacode_field Comments:\n $comments_field'"; echo "Your Information has been submitted to $to!"; mail($to, $subject, $body); } else { echo "Please try again after some time..."; } ?>
  9. yeah...right now i am receiving it from the last email i created in the server. i want to recieve it directly from the sender. can you please copy my codes and insert your code in the appropriate place. thanks a lot
  10. I want to be able to reply to the email of the sender ( of the form ) heres the codes <?php $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/")); // Checkbox handling $field_1_opts = $_POST['field_1'][0].",". $_POST['field_1'][1]; mail("harshad@madiganpratt.com","Invitation - Form submission","Form data: rooms: $field_1_opts First Name: " . $_POST['fname'] . " Last Name: " . $_POST['lname'] . " Your Email: " . $_POST['email'] . " Phone Number: " . $_POST['pnumber'] . " Request your arrival date: " . $_POST['field_2'] . " Request your departure date: " . $_POST['field_3'] . " Please send me an ownership package: " . $_POST['field_4'] . " ",$headers); include ("confirm.html"); ?>
  11. @ Chintan, Picachu I am not a php guy. I am just learning the basics. I used a sign up and login page that i found online. the sign up page works fine but the login creates the issue...i will attach the files here..if u wanna look. ur efforts are appreciated very much [attachment deleted by admin]
  12. heres the code for the login page ...i changed the server and username info for privacy <?php include "include/session.php"; $dbservertype='mysql'; $servername='supremeserver.com'; // username and password to log onto db server $dbusername='newlogin'; $dbpassword='new18'; // name of database $dbname='newlogin'; connecttodb($servername,$dbname,$dbusername,$dbpassword); function connecttodb($servername,$dbname,$dbusername,$dbpassword) { global $link; $link=mysql_connect ("$servername","$dbusername","$dbpassword"); if(!$link){die("Could not connect to MySQL");} mysql_select_db("$dbname",$link) or die ("could not open db".mysql_error()); } ?> <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> <title>LOGIN</title> <meta name="GENERATOR" content="Arachnophilia 4.0"> <meta name="FORMATTER" content="Arachnophilia 4.0"> </head> <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000"> <?php $userid=mysql_real_escape_string($userid); $password=mysql_real_escape_string($password); if($rec=mysql_fetch_array(mysql_query("SELECT * FROM plus_signup WHERE userid='$userid' AND password = '$password'"))){ if(($rec['userid']==$userid)&&($rec['password']==$password)){ include "include/newsession.php"; echo "<p class=data> <center>Successfully,Logged in<br><br><a href='logout.php'> Log OUT </a><br><br><a href=welcome.php>Click here if your browser is not redirecting automatically or you don't want to wait.</a><br></center>"; print "<script>"; print " self.location='welcome.php';"; // Comment this line if you don't want to redirect print "</script>"; } } else { session_unset(); echo "<font face='Verdana' size='2' color=red>Wrong Login. Use your correct Userid and Password and Try <br><center><input type='button' value='Retry' onClick='history.go(-1)'></center>"; } ?> </body> </html> ____________________________________________________________________________________________________ your help is much appreciated
  13. Thanks a lot After using this code...i am receiving " no data sent" error message. try it in colonialcasa.org/signup.html. create a login and try to log in throug any of the pages. ur help is much appreciated.
  14. I had a success page redirect after the login...but the login happens even if the username and password is not entered. you can check it in colonialcasa.org here's the code for the login.php page ( i have obviously changed the server name, database and password for privacy reasons ) <? /*simple checking of the data*/ if(isset($_POST['login']) & isset($_POST['pass'])) { /*Connection to database logindb using your login name and password*/ $db=mysql_connect('servername','login','password') or die(mysql_error()); mysql_select_db('mpahost_logindb'); /*additional data checking and striping*/ $_POST['login']=mysql_real_escape_string(strip_tags(trim($_POST['login']))); $_POST['pass']=mysql_real_escape_string(strip_tags(trim($_POST['pass']))); $q=mysql_query("SELECT * FROM login WHERE login='{$_POST['login']}' AND pass='{$_POST['pass']}'",$db) or die(mysql_error()); /*If there is a matching row*/ if(mysql_num_rows($q) > 0) { $_SESSION['login'] = $_POST['login']; $login='Welcome back '.$_SESSION['login']; } else { $login= 'Wrong login or password'; } mysql_close($db); } /*Use of Sessions*/ if(!session_id()) header("Location: advocates.html"); // success page. put the URL you want header("Cache-control: private"); //avoid an IE6 bug (keep this line on top of the page) $login='NO data sent'; //you may echo the data anywhere in the file echo $login; ?>
×
×
  • 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.