Jump to content

Sarah

Members
  • Posts

    104
  • Joined

  • Last visited

Everything posted by Sarah

  1. Slothso- I thought those AntiAbuse headers are attached no matter what, not when they are reported as spam. As far as the nobody address, I was having problems with that too. Apparently, somehow the server is configured to sendmail from that address if you don't specify some parameters in your mail() function. I use mail() to send email to my Lotus Notes mailbox. This is the mail() I use: >$mailto = "whoever@****"; $subject = "mySubject"; $message = "my Message"; $name = "Sarah"; $mailfrom = "myemail@****"; $headers = "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "From: ".$name."<".$mailfrom.">\n"; $headers .= "Reply-To: ".$name."<$mailfrom>\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-Mailer: PHP4\n"; if (@mail($mailto, $subject, $message, $headers)) { header("Location: http://www.****"); exit; } else { print "<h2>Mail did not send...<br>"; exit; } Try that.. hope this helps.. PS - you may/may not need the /n's at the end of the headers.. or you may need a /r , it depends on what program you are using. Sarah
  2. Yeah, I've tried different form names and now different submit names. Do you know of a way to bypass the form submitting with just using JavaScript? Like if I put an onClick button or the onChange handler in the 'select' tag that will reload the page? I tried it once but I kept getting errors.
  3. I tried different submit names just now. Didn't work..... I'm still getting the same response.
  4. Sarah

    Yikes!

    I'll give you a suggestion. Don't use FrontPage to make your forms for you. They are too confusing (obvious in the 'action' line of the form) It's hard to decipher what it is doing. If you'd like help designing your form, or some basics, let me know.
  5. Hi all- I'm having some trouble with a dynamic drop down box on one of my PHP pages. I've been searching the net for examples, but mostly I've been seeing ones that dynamically change another drop down box underneath it. (For example, choosing a make of car in box A, and having it automatically update box B with the available models.) I need it to do something different, not difficult, but just can't figure it out. ----------- The purpose of my page is to add a customer name & info to a mySQL database. The user can either choose from an existing customer in the database or enter in a new one. If the user chooses an existing customer, the PHP code will query the database, printing out all available customer names in a < SELECT > menu. Like thus (note: the code does not work properly): ><tr> <td class="heading" align=right>Choose previous: </td> <td> <form name="completeform" method="post" action="sales.php?action=addproj&go=2"> <select name="contact" class="data"> <option value="">--Choose contact-- <?php //select all previous contacts $query = "SELECT ContactID,Company_Name FROM ContactTable ORDER BY 'Company_Name'"; //run query rq($res,$query); while ($rows = mysql_fetch_array($res)){ $id = $rows['ContactID']; $compname1 = $rows['Company_Name']; ?> <option value="<?php echo $id;?>"><?php echo $compname1;?> <?php } ?> </select><input type=submit name=submit value="Complete"></form> </td> </tr> When the user clicks on an option in the select menu and clicks the 'complete' button, it should then reload the same PHP page, request the ID number, and fill in all appropriate information fields with the data with the ID from the select menu. This is not doing so. Notice I want the form to submit to 'sales.php?action=addproj&go=2'? Well, after the click of 'Complete', the form is actually submitting to 'sales.php?action=addproj&go=1&id=&flag=', which is the submit value of another form outside of this code! I guess you can't nest forms or something?? Mad!!! Can anyone provide any input? I've even tried JavaScript, but I can't get it to reload the PHP page & send the ID variable. If anyone wants to see the page, I will provide more code or send a link. Thanks in advance!
  6. I don't know much about .htaccess anyways. I guess i'll just leave well enough alone. I made a different timeout script that logs people out when they are inactive, so it will bypass alot of nonsense. Thanks for the help.
  7. Well I just checked the instance problem. Apparently, I wasn't closing out of all browser instances. It works now. I guess there's not a way to just do it with the one window (which isn't too much of a problem I guess). Do I need to change any PHP config settings for the timeout anyways? What's the default timeout for a logout?
  8. Well, there's alot of code to post... too much for here.... I don't know what I would have coded wrong anyways... I just create a session and destroy it on the logout screen. I just want to make sure it's closed if the user closes all instances of the browser. I will check on that again, checking the instances.
  9. Where would we be working from? At TCH or at home?? I'm in PA.....
  10. The session ID is not being passed through the URL, so it is storing it in a cookie, apparently. I checked my phpinfo file, and it said that session.cookie_lifetime = 0, and session.cache_expire = 180. These were the defaults for the server also. I've never changed anything in the php.ini file.
  11. I'm not using any cookies, as far as I know. All that I am using are session variables to store login data, and data about the user I retrieve from the database. I've checked out that link you gave me, but I'm not really sure how to use those config settings with this situation.
  12. Hello all- I am having problems with this, and I just can't find the answer I'm looking for. So I'll ask it to the Total Choice Family. I wrote a program in PHP, where users log in/log out. I start a session when they log in and when they hit the 'logout' button, it destroys the session. My problem is that if the user closes the browser window without choosing 'logout', the session is still active! I know this because I've tested it a few times, with closing the window and trying to open up a page again and its still showing my session variables. I know to check for a valid login on every page, but that's not the point. I need to make sure that the session will destroy itself on close of the browser. Can this be accomplished by using PHP and JavaScript? Please help. Thanks. Sarah
  13. Well, that worked! Thanks!
  14. Hey guys, I need to know if anyone knows how to make a restrictive date form field in either PHP or JavaScript? I want people to be able to pay invoices online, but I am only accepting the payment for an invoice date of 45 days or less from the date of invoice. So if they received an invoice from November 1st, and they went to pay it today online, the 13th, the form would be accepted since it's less than 45 days. But if they went to pay it two months from now, they would fill in the invoice date, and a message would pop up saying invoice cannot be paid online. Does anyone know how to go about doing this? Thanks!!!
  15. I would check out the mySQL web site documentation: http://www.mysql.com/doc/en/Column_types.html here they give you an explanation of all the types you could use for your field, and you can decide the best for yours. I do know that varchar only goes up to 255 characters.
  16. Here's my try:
  17. Well I just found an old computer I had laying around and installed Abyss Web Server , including mySQL, PHP support, and phpMyAdmin. Looks like it's working like a charm! I also signed up with no-ip.com, where they give you a free domain name to use..they are a dynamic DNS service. Now I will be able to make my apps and put them on our local intranet. But what if outside users need to access the intranet? Is that a port change? This web server will be behind a firewall.
  18. that Abyss web server software looks like it might be a good idea. I'm checking it out now.. Do you think i'll be able to install PHP and mySQL on it and run it from there?
  19. I want to use my own server (or put server software on my PC). That I do know. I dont want to use a pre-made intranet software package. My #1 app uses a PHP script that connects to the mySQL database , adds the information, and closes the connection. Our network at work does have a firewall but I can configure it to whatever I need. I just need to know how the heck to start this up.
  20. If I get php and mysql for my PC at work and use abyss, Will it work for the forms that I need to get sent from the internet website? Or only local apps like my #2 and #3? If I get an app server, will I be able to do the same?
  21. I have designed several web-based database applications for my company that I would rather have stored locally. Here they are: #1: An application that stores forms sent by a website for review and edit. #2: An application for keeping track of sales leads. (has nothing to do w/ a website or getting data sent from a site) #3: An application that stores part prices. Can anyone tell me how I would go about getting these off the web and storing them locally? Like on our intranet or something? I dont know anything about intranets. Well, i'd assume I would need to access the server where mySQL is (right now of course at Total Choice) so that's why they have to be on the web. Do I need to buy an applications server and install PHP and mySQL on it? Is that the only way? If I knew how to program in MS Access, I would be able to do it that way. But I dont know anything about it, that's why I want to use mySQL and PHP. Thanks in advance.
  22. Ok, this is probably a really simple answer, but still I can't figure it out. On my website, I use all relative links, including my javascript navigation menu. Mostly every page is coded in PHP. There are 2 pages where I want to use the https protocol, so I coded absolute links for these pages. Well, I realized that after I switched to the https protocol, all the relative links are 'relative' to https , and everythings showing up in the secure mode, and I can't get back to http. My questions are: How do I show a warning when someone is about to go into the secured area? How do I show the warning when they leave the secured area? and How do I accomplish the switching of modes? Any help would be appreciated. Thanks.
  23. Personally, I like Macromedia Fireworks MX for web graphic work...
  24. mtimmer, There are configuration options for sessions using PHP that you can set in the PHP.ini file. There is one called 'session.cookie_domain' which allows you to set the domain in which the PHP sessions are stored. I believe if you change this to the secured domain, it will let you use them with the SSL pages. Let me know if this works. Sarah
  25. This kind of image usually means that: A. The picture was not uploaded to the server or B. The code referencing the picture is not written correctly. Usually, the code might be referencing a picture somewhere instead of where you put it. For instance, let's say you keep all your pics in a subdirectory called 'images'. Check your HTML code where it says <img src = " >, and see where it is pointing. if the code says, "src = "mypic.jpg" instead of "src = "images/mypic.jpg", then you know it won't show up. Send a link so we can take a look at it. Sarah
×
×
  • Create New...