Jump to content

lillizzierae

Members
  • Posts

    16
  • Joined

  • Last visited

About lillizzierae

  • Birthday 10/02/1981

Profile Information

  • Gender
    Female

lillizzierae's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. As straight-forward as I can get; I'm extremely dumb when it comes to php. So I need a better explanation, sorry. I've just been using the form with literally no problems and emails get sent.
  2. I've used this contact form multiple times with no problems whatsoever. When I used it with godaddy's hosting it's not sending me an email. I'm receiving no errors. What's wrong with this code? It's on the internet now at: http://www.minutestodisney.com/contact.html. ::Verification:: <script type="text/javascript"> <!-- function MM_validateForm() { //v4.0 if (document.getElementById){ var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]); if (val) { nm=val.name; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' must contain the number '+min+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; } } if (errors) alert('The following error(s) occurred:\n'+errors); document.MM_returnValue = (errors == ''); } } //--> </script> ::::The Actual Form:::: <div id="contact_table"> <form action="contactthanks.php" method="post"> <table width="450" border="0" cellspacing="10"> <td width="440" align="left"><label for="name">*Name:</label><br /><input type="text" name="name" id="name" /></td> </tr> <tr> <td align="left"><label for="city">Phone:</label> <br /><input type="text" name="city" id="city" /></td> </tr> <tr> <td align="left"><label for="email">*Email:</label><br /><input type="text" name="email" id="email" /></td> </tr> <tr> <td align="left"><label for="message">*Message:</label><br /><textarea name="message" rows="10" cols="40" id="message"></textarea></td> </tr> <td align="left"><label for="answer">*Type in the following answer to the question:<br />2 + 2 =</label><br /><input type="text" name="answer" id="answer" /></td> <tr> <td align="left"><input name="submit" type="submit" class="submit-button" onclick="MM_validateForm('name','','R','email','','RisEmail','answer','','RinRange4:4','message','','R');return document.MM_returnValue" value="Submit" /></td> </tr> </table> </form> * are required fields </div> </div> :::::THANK YOU PAGE WITH PHP:::::: <?php if(isset($_POST['submit'])) { $to = "lillizzierae@aol.com"; $subject = "Disney Contact Form"; $name_field = $_POST['name']; $phone_field = $_POST['phone']; $email_field = $_POST['email']; $message = $_POST['message']; $body = "From: $name_field\n E-Mail: $email_field\n Phone: $phone_field\n Message:\n $message"; echo ""; mail($to, $subject, $body); } else { echo "Go back"; } ?>
  3. I tried what you said but it didn't work. It actually made it work less and that probably doesn't make sense. When I click submit (on either mine or his form) they both show that it was submitted. The only difference is when I click submit on his I don't receive any mail; on the identical form on my site I receive mail. When I added the header and clicked submit it didn't allow the page to load and I still didn't receive any mail. I checked for errors and there aren't any. Grr!
  4. I have a simple form I made for my site that works but I decided not to use it and just go with the "Email me at:" so on. A friend of mine needed a form and I figured since my old form worked that it would work on his site too.. but it doesn't. I used the exact code for the form and for the php. I don't know why. I tested it again on my site and it works. I receive the mail. So why doesn't it work on his? We both go through two different hosting. Here's the php. The only changes I made was I switched my URL to his and right now I'm using my email address.
  5. it still didn't work. KIDDING! it definitely worked! thank you so much. Liz
  6. i'm starting to wonder if something else could be wrong. neither of those worked. i doubt this is a problem but i might as well ask. you don't think there could be a problem with both the field names in the table and the input names in the form being exactly the same?
  7. that makes better sense now. but we produced an error Parse error: syntax error, unexpected ';' in /home/lizzieni/public_html/data.php on line 21 which the problem is in this line somewhere: '$_POST[email]')"; if i move the semi-colon to the left, i receive an error on the next line.
  8. you guys are wonderful! thank you. what's the point of going to class when you all are teaching me?? jk one more question and i promise i won't be bothering you guys for.. a little while i completely forgot to select a table i wanted the data to go in. i thought this code would work but apparently not. in my table nothing is capitalized. first name is fname. <?php define ('DB_USER' , "lizzieni_lizzie"); define ('DB_PASSWORD' , "mac45545"); define ('DB_HOST' , "localhost"); define ('DB_NAME' , "lizzieni_website"); define ('TABLE_NAME' , "newsletter"); $dbc = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) or die ("No Connection:<br />" . mysql_error()); mysql_select_db (DB_NAME) OR die ('No selected database: ' . mysql_error() ); $sql="INSERT INTO newsletter (fname, lname, phone, dob, email) VALUES ('$_POST[fname]'; '$_POST[lname]'; '$_POST[phone]'; '$_POST[dob]'; '$_POST[email]')"; echo "Information sent ". $fname . " ". $lname . " ". $phone . " ". $dob . " ". email ." "; echo "You'll receive newsletters monthly"; ?>
  9. i'm just pulling up more and more errors. the code you gave me worked. BUT (there's always a "but") now i'm getting a new error. Parse error: syntax error, unexpected ')' in /home/lizzieni/public_html/data.php on line 8 it's line 8. so that would be the "mysql_connect" line. i always have trouble with this.. anything else i'm fine with. sorry!
  10. line 3. so the error is the first "define" i'm gonna try everything and see what happens. i'm crossing my fingers over here!!
  11. i'm still getting that error. this is bugging me. i was told dreamweaver could be the problem and to use notepad for this page. have you ever heard of that? i haven't tried writing the code in i only copy and pasted it into it and still came up with the error. maybe i should write it.
  12. i'm getting an error on my third line. the error is: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/lizzieni/public_html/data.php on line 3 i'm not too sure what exactly is wrong... here's my code
  13. right now i'm making a form for a newsletter. what it's going to do is send the data to my database. i'm writing the "third party script" and i don't know the code to send it to the database. the database is called _website and the table is newsletter. what i have so far is this: can anyone help me here?
  14. hi. i really need some help here. i'm doing my final and i have to pull images from my database. the problem is i was never taught this in class. and i've been looking everywhere to understand how to do it but can't find anything. i'm clueless! Huh what i'm trying to do is make a gallery on one of my pages (http://lizzienichols.com/work.php). right now there's no php or anything getting pulled from the database. it's simply set up the way i know how to set it up. if someone could take some time to explain it to me i'd appreciate it. help.. please? Grin liz you can get in touch with me through email too (lillizzierae@aol.com)
×
×
  • 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.