Jump to content

Sarah

Members
  • Posts

    104
  • Joined

  • Last visited

Everything posted by Sarah

  1. Ok thanks for your help Borfast! I took out my require_once statements and just put the code in place of it and the code ran fine. I guess it didn't like something about referencing another page. Thanks for your help. Sarah
  2. Well, too bad I don't know any CGI scripting. Is that the only way?
  3. Someone please provide insight on this, before I go nutty. I am using a single php page (forms.php) in which I handle 4 different forms, using a switch statement to distinguish which is to be handled. I wrote almost the same exact code for each form, but only 2 are redirecting to the confirmation page, while the other two do not do anything! Instead of redirecting to the confirmation, it shows a blank screen and the url shows forms.php . I checked my code 100x over, and I can't find any differences why 2 work, and why 2 don't. I will provide the source code to anyone that is willing to take a look. If anyone could help, please reply asap or IM me on AIM- PSUSarah. Thanks in advance. Sarah
  4. Bored.com - Bored.com Always some funny stuff on there when you're sick of surfing for hrs.. Sarah
  5. Ok, that's what I thought, but I wasn't sure... since someone said to password protect that directory and you couldn't from Cpanel. Well, I just made a folder outside public_html and put some hidden data into it , then referenced it in an include and it worked great. Now, the only thing that I have to figure out is these file permissions and which to set them to so people can't change my files. Anyone help me?
  6. What happens if you can't password protect a folder outside the public_html directory?? Cpanel won't let you do that.. Sarah
  7. I know from experience that If you try to write any HTML code (such as an IMG tag) before certain PHP functions, it gives you a header error, saying output has already been started. Meaning output to the browser already occurred before the PHP processed. Maybe it has something to do with that... Sarah
  8. That's some good code to use.. I think I will try that when I clean it up. But for now (to get it working temporarily) I just changed the column names back to "Date_Of_Call" with the underscores and then wrote this code to make it display differently: >if ($sortby == "Date_Of_Call"){ $sortby_print = "Date Of Call"; } That way, it'll just print the sortby_print variable instead of the column name.. But I will try your code, seems less redundant than coding all those if statements. Thanks for the ideas! Sarah
  9. Yes, you don't have to do anything on your end with Apache/PHP install. They are already installed for you. Like was said, just write your code in Dreamweaver, starting your PHP scripts with <?php and ending with ?> , and save your file as a .php file. Then just upload to TCH and you'll see the results. Sarah
  10. Well, I couldn't figure it out.. so I changed the column names. But I wanted them to show up like this on the screen: "Sorting by: Date Of Call " but now since I couldn't use spaces, It looks like this: "Sorting by: Date_Of_Call " . Kinda unprofessional.. I'll have to write more code to change the variables I guess. Sarah
  11. Please help! I can't figure out why this code isn't working. I made my column names in my mySQL table with spaces in them, and now I'm getting syntax errors on an INSERT query.. I tried escaping out quote characters and everything.. I must be doing something wrong. >$query = "INSERT INTO contacts (Date Entered, Date Of Call, Company Name, Contact Name, Phone, Contact, Source, Result) VALUES ('$dateent','$datecall','$compname','$contname','$phone','$contact','$source','$result')"; I'd appreciate any help on the subject. Thanks! Sarah
  12. I'm having trouble viewing mySQL database records if they are viewed by page. I know you need to use the "LIMIT" option in the SQL query. I've got this funky for loop going, which seems to work, but there are things missing. Like having the link unclickable when you are viewing the certain page. Could anyone give me a small rundown of the logic behind paginating this data? My code's getting too complex and I know there is an easier way. Thanks!
  13. Sarah

    Form Processor

    Thanks for the post, Surefire. I try to write my own too to gain experience for further development projects. (and to build up my resume to find a job!!!) Job prospects stink around here..
  14. Sarah

    Form Processor

    I needed some kind of script for forms on the site I'm working on now, so I began to look into CGI for form processing. But I wasn't familiar with all the syntax, and it was taking FOREVER to understand. I knew there was an easier way. So I ended up writing my own form processor in PHP. It basically uses one PHP file that uses a switch statement to control what form on the site was submitted. If Zethilone needed some help with a simple one, I would gladly write one for him.
  15. Sarah

    Form Processor

    Hey Zethilone, Are you still looking for a form processor?
  16. Yep, solved the nobody@serverXX.totalchoicehosting.com . Hopefully this will help anyone else having the same problems. C-ya around.
  17. I got it!!!!!! YAYYA! I read some posts on php.net and found that the "\r" only works for Windows-based servers using SMTP. (my old web host used that). So I took them out and added the From header and it worked!! Hooray!! Here's the code: >$mailfrom = "sarah@****"; $emailto = "sarah@****"; $subject = "subject"; $message = "message"; $headers = "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "From: $mailfrom\n"; $headers .= "Reply-to: $mailfrom\n"; $headers .= "X-Priority: 3\n"; $headers .= "X-Mailer: PHP4\n"; if (@mail($emailto, $subject, $message, $headers)){ print "<a href='login.php'>Login</a><br>"; print "Your password was emailed to you. Please check your email within a few minutes."; } else{ print "Your password could not be emailed.. Please contact your system admin or try again."; exit; } Thanks everyone. Rock Sign PS - hey Rick, I have a parrot just like the one in your photo!
  18. Ok, I checked the thread and I understand that.. But how could I send all the other headers while putting that 4th parameter in? Should i put: >mail($mailto,$subject,$message,$headers,From: $mailfrom) or something like that? I don't think it handles 5 parameters.
  19. Apparently, the mail was going to my account on TCH locally, instead of directing it out to my own mail server, even though the MX records were pointing to the right server. All the mail that was sent showed up in my webmail box!! I submitted a help desk ticket and we got it straightened out. Now i'm trying to figure out how to make the "nobody@server29.totalchoicehosting.com" disappear from the "from" field. Thanks for the help!
  20. ball and chain
  21. I'm receiving email fine if I send to myself from my home account. Maybe it has something to do with the MX record for my email being set to a different server than one at TotalChoice? We are using our own email server, which has a Lotus Notes Email Program. I can't imagine why else it wouldn't be working. I don't get any error messages. I've taken out the ini_set commands, I was using it to set the mailfrom to make sure things would get there from me instead of the default "nobody". I guess I will submit a help ticket since I can't figure out what else to do. Sarah
  22. I am having a problem sending email through PHP's built-in mail function. I can send to my address at home, but not to my address with the domain i have hosted with you. Let's say my domain with you is "****". here is my code: >$from = "Webmaster"; $mailfrom = "sarah@****"; $emailto = "sarah@****"; $subject = "My Subject"; $message = "my message"; $headers = "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: ".$from." <".$mailfrom.">\r\n"; $headers .= "Reply-to: $mailfrom"; $headers .= "X-Priority: 3\r\n"; $headers .= "X-Mailer: PHP4\n"; ini_set(sendmail_from,$mailfrom); if (@mail($email, $subject, $message, $headers)){ print "<a href='login.php'>Login</a><br>"; print "Your password was emailed to you. Please check your email within a few minutes."; ini_restore(sendmail_from); } else{ print "Your password could not be emailed.. Please contact your system admin or try again."; exit; } Can anyone help me identify what's going on? I tried everything, and I don't want to use someone else's code if there's a small fix. Please help! Sarah
×
×
  • Create New...