Jump to content

gsmith

Members
  • Posts

    61
  • Joined

  • Last visited

Everything posted by gsmith

  1. gsmith

    PHP Mailing

    Haven't looked at that new one yet, but I know you can specify all your header info with the mail() function too.
  2. gsmith

    PHP Mailing

    haha. Thanks.It actually isn't spam though - I promise. :)It's for a website that has a user log-in system and the e-mails are being sent from a user to a selected user(s), hence the potential for an array of several e-mail addresses.
  3. gsmith

    PHP Mailing

    Thank you!No time to try it now, but I'm sure it will work.
  4. gsmith

    PHP Mailing

    I've been sending e-mail within PHP scripts using the following basic commands: $to="someemailaddress";$message="message";$subject="subject";mail($to, $subject, $message); However, now I have an array with several e-mail addresses in it. Using that same format won't send my mail. How can I send an e-mail using multiple e-mail addresses inside an array instead of one defined variable?
  5. first, make sure your if statement is:if (username == exists)instead of:if(username = exists)
  6. gsmith

    way to redirect pages??

    That's correct, but if there are some pages where linking to page1.php is ok, there would have to be some kind of conditional test first. Perhaps passing a query string with the "ok" link to test whether or not the page1.php should be displayed or redirected....and if the query string value doesn't exist, then you could redirect.
  7. gsmith

    way to redirect pages??

    Will you have some pages where linking to page1.php, etc. will be allowed? Or will all references to page1.php need to be redirected?
  8. gsmith

    header difficulties

    I'm not exactly sure what your header problem is....but you could cut down some of your code and just use the file command....Instead of: $filename = 'password.txt'; $fp = fopen( $filename, 'r' ); $file_contents = fread( $fp, filesize( $filename ) ); fclose( $fp ); // Place the individual lines from the file contents into an array. $lines = explode ( "\n", $file_contents ); You could have: $filename = 'password.txt';$lines=file($filename); file() will read the contents of a file into an array.
  9. gsmith

    Time to Design

    I still understand your point. I still agree too - just wanted to point out that WYSIWYG programs can be ok too.Poor me started about 10 years ago with Notepad and HTML.
  10. My best guess would be to try defining your $subtotal variable outside of the echo statement. Then use $subtotal in the echo statement instead of $subtotal=.....
  11. gsmith

    Form Processing

    I think your problem might be the buttons.If I change your two buttons to text fields, it works for me.
  12. gsmith

    Form Processing

    is your PHP file called temp.php or Temp.php? Letter case would matter.
  13. gsmith

    Time to Design

    I understand that. I started off always coding everything myself (to learn mostly). I still go back and edit a lot of the code even when using programs like Dreamweaver.
  14. gsmith

    Form Processing

    just to clarrify...this part:<?php$da = $_POST['daaaa'];$lol = $_POST['LOLOLOL'];echo $da.$lol;?>is in the other file, named test.php correct?
  15. gsmith

    Time to Design

    Just a note on Jonas' comments...I just finished building a site that took all weekend, plus a few evenings during the week last week. I used Dreamweaver 8, and IMHO, it looks decent - even professional. The trick was, I did use a server-side language (PHP) to make the site more dynamic and powerful. Dreamweaver helped make it "look" cleaner. I disagree that WYSIWYG programs can't make good sites, but I would agree that you would have to incorporate some other helpful programming yourself.
  16. gsmith

    ? in URL and $_GET

    Thanks.I've thought about it more, and I think I'm simply going to take a different approach at what I was trying to do.
  17. Before your response, I had searched PHP.net.I tried using strpos() foreach($temp as $value) { if(!(strpos($value, $usr))) { fwrite($fs, $value); } } $temp is the array I got using the file() command. I want to write to the file $fs all the lines in $temp, except for the line that contains within it somewhere the same exact value that $usr holds.The above code has worked if the line in question is the last line of the file. But if it's in the middle, this code stops writing the remaining lines back to the file once the one line in question is found.
  18. I am currently reading a file into an array: $newthing=file(filename); each line I read in will be of the general format:$uname[0]=username; $known_as[0]=realname;$uname[1]=username; known_as[1]=realname;etc.I have another variable, we'll call it $x. $x will equal the username portion of one of the above lines. I want to do other things (that I do know how to do) ONLY IF $x is NOT in the line that I've read into the $newthing array. How can I search and determine this line by line?
  19. gsmith

    ? in URL and $_GET

    I've been taking advantage of putting various information in my URL's and retrieving them on the next page with the $_GET[] command.I now have one point where I'd like to send a variable in the URL....but it's an array, and I won't even know the size of the array until run-time. (It is a single dimension array though) Can this be done? If so, how?
  20. That worked perfectly! Thank you!
  21. Thanks for the reply! I'll look into that.But I am more familiar with PHP than Javascript, and would prefer to stay working more with PHP. Does anyone know of a way to do this using PHP?
  22. That doesn't make any sense. It's my understanding that javascript is run on the client side, within the browser itself. Which means your hosting server would be of no factor in the equation...only your users' browser (and whether or not they have Javascript disabled) would matter.I'd still suggest taking this to the Javascript forum and trying it out on your site. I have a hard time believing that javascript is dissabled on your hosting site.
  23. Well, overall....I see javascript and no PHP.Maybe try asking in the Javascript forum.
  24. I have validation on some pages that will return an error. Currently my scripts print the error message, and include the original page so the user can re-enter the items....so my error message is at the top of the previously displayed page.Is there a way to format where that error message goes? Could I get it to display the previous page and put the error message next to or under the incorrect item...and how would I do that?
  25. Give us a code sample of what you currently have, and we should be able to tell you how to tweak it to do what you want.
×
×
  • Create New...