Search results

  1. G

    How do I find an occurrence in a string after a specific occurrence in php?

    I'm looking for $startpos = strpos($page, '<div id="yada yada"') + 7; I want to set $endpos to the position of the closing div, "</div>". If I do that, it will read the first closing div and not the one that I want. How do I find the next /div after the start one I found?
  2. G

    Using Cron Job To Send Out Email List

    I have a friend who sends out inservice information for about 50,000 teachers a couple times a week. I have set up a php page to check a database to find any unsent emails that he may has created and sends them to each of the teachers. He sends these out 2 to 3 times a week. I have been told...
  3. G

    How can I send an email through a php file to look just like this one?

    I want the email to look like this with the pictures and everything through a php page. How do I get it to do it? pbngb.com
  4. G

    Why is my MySQL being written to twice with only one code line?

    I just now changed the code to: if ($userNum != 1) { mysql_query("INSERT INTO 80sMusicLibraryUserNumPageVisits (userNum, time, date, page) VALUES ('$userNum', '$time', '$dateToday', '$newUrl')"); } and it created a new $userNum and recorded a page visit by that new userNum to...
  5. G

    Why is my MySQL being written to twice with only one code line?

    I'm the "sitebuilder". I built it all by my written code.
  6. G

    Why is my MySQL being written to twice with only one code line?

    What exactly does that mean and how do I fix it?
  7. G

    Why is my MySQL being written to twice with only one code line?

    I have in my code, mysql_query("INSERT INTO 80sMusicLibraryUserNumPageVisits (userNum, date, page) VALUES ('$userNum', '$dateToday', '$newUrl')"); It will write a record of: 1 2014-02-16 1980 wich would be correct. I'm user 1 because I was the first on the site. Date and page is also...
  8. G

    How do I strip out this php string?

    Hummmm, that'll work!!
  9. G

    How do I strip out this php string?

    I now have this: $start = 0; $end = strpos($newUrl, "/") ; $firstPage = substr($newUrl, $start, $end-$start); echo $firstPage, "<br>"; $start = strpos($newUrl, "/") + 1; $end = 256; $secondPage = substr($newUrl, $start, $end-$start); $secondPage = str_replace("/", "", $secondPage); echo...
  10. G

    How do I strip out this php string?

    I don't know why I did that. Now it is how I have it.
  11. G

    How do I strip out this php string?

    If I have the string "somepage/otherpage/" set to $newUrl, how do I get "otherpage" set to $secondPage? Here is what I have. $newUrl = $_GET['newUrl']; preg_match("/^[A-Za-z0-9' -_ ]*(?=\/)/", $newUrl, $matches); $firstPage = $matches[0]; echo $firstPage, "<br>"...
  12. G

    What is the best way to learn to use URL rewrite using php and MySQL?

    Everything seems to be working great. Thanks for the help.
  13. G

    What is the best way to learn to use URL rewrite using php and MySQL?

    It's working now. I have to rewrite a few things now and see if everything works right. I'm 3 hours into parent teacher conference and I have had one parent so I have a little time here.
  14. G

    What is the best way to learn to use URL rewrite using php and MySQL?

    Just to experiment around, I put in my .htaccess file: RewriteRule ^(.*)$ /index.php?newUrl=$1 Then I put in my index.php file: $newUrl = $_GET['newUrl']; echo "newUrl", $newUrl; All I get out of this is "newUrl"
  15. G

    What is the best way to learn to use URL rewrite using php and MySQL?

    ok, I have read a lot and have made some changes. I have in my .htaccess: RewriteEngine On RewriteRule ^(.*)$ /index.php?artid=$1 I have been told to set $newUrl = $_GET['newUrl']; ? how does this work when I do not have a newUrl set in the address bar? Currently, if I type...
  16. G

    What is the best way to learn to use URL rewrite using php and MySQL?

    Yes, I'm a full time teacher. What I'm saying that I don't have time for is to work on my ideas so I don't practice the web design that I learn. Each time I work on it, I have to go back and read up on what I'm doing. Most of the time now, I know enough to search for what I need. Or at least to...
  17. G

    What is the best way to learn to use URL rewrite using php and MySQL?

    A time or two. I'd like to get to that point but I'm really not using it enough to be really good at it. I have a lot of good ideas, just not the time to follow through with them fully because of my full time job so what I learn is not real strong due to lack of using it.
  18. G

    What is the best way to learn to use URL rewrite using php and MySQL?

    Thanks. I'll check them out.
  19. G

    What is the best way to learn to use URL rewrite using php and MySQL?

    Ok, so where is a good step by step explanation of how to do it?
Top