Cotton Rohrscheib

The Cotton Club Blog & Podcast

  • Home
  • Bio
    • Resume
  • Blog
    • Faith & Family
    • Marketing & Tech
    • Farm & Business
    • Entertainment
    • Health & Wellness
    • Urban Farming
    • Weekend Projects
  • Media
    • Newsletter
    • Photo Galleries
    • Instagram Feed
    • Video Archives
    • Podcasts
    • Music Playlists
  • Books
  • Connect
    • Rohrscheib Capital
    • Disclaimer
    • Privacy Policy
You are here: Home / Marketing & Tech / Table Events Bug w/ Catalog – Registration App

Table Events Bug w/ Catalog – Registration App

April 10, 2008 by Cotton Rohrscheib 3 Comments


I put together a class catalog and registration application a while back for a client and it’s been working great with the exception of one small bug that I can’t seem to be able to locate.  I have it setup using Table Events (After Record Added) in PHPR to send an email once someone registers online and also to redirect the registrant to another page once they have registered.  The redirection works great, no problems there, it’s just the email thing that’s giving me issues.  Here’s the weirdest part of the deal, occasionally an email will go through the system and make it’s way out…  It’s real sporadic though.

I posted a note on Xlinesoft’s Forum, hopefully someone will have some advice as to where I might look to troubleshoot this issue out.  Here’s the table event code that I am using to send the email out after a record is added and also to redirect the visitor.  If any of you out there have any suggestions I would love to hear from you.

   1: // Parameters:
   2: // $values - Array object. 
   3: // Each field on the Add form is represented as a 'Field name'-'Field value' pair
   4: // $keys - Array object with added record key column values
   5:  
   6:  
   7: //**********  Redirect to another page  ************
   8: header("Location: http://www.anurturingtouch.com/confirmation.php");
   9: exit();
  10:  
  11:  
  12:  
  13: // **********  Send simple email  ************
  14:  
  15: $email="[email protected]";
  16: $message="New Registration has been made on your website, please login and retrieve their information, http://www.anurturingtouch.com/cms";
  17: $subject="New Registration";
  18: mail($email, $subject, $message);

Share this post on:

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pinterest (Opens in new window) Pinterest

Related

About Cotton Rohrscheib

The Cotton Club is a monthly podcast hosted by me, Cotton Rohrscheib. I'm a 52 year old entrepreneur w/ ADHD, OCD (and now AARP) that refuses to grow up as I grow old. I have collaborated and invested in hundreds of projects throughout my career in multiple industries such as; technology, healthcare, and agriculture. I also have 25 years experience in the marketing industry as a co-founder of an award-winning advertising agency. I will undoubtedly cover a wide variety of topics on my podcast while sharing some really crazy stories and situations that I've been fortunate to witness firsthand. I also have a book coming out in 2025 titled, "Mistakes were Made"

Comments

  1. Mott says

    April 10, 2008 at 5:01 pm

    Cotton, do this, try moving the table event for the redirect after your email instructions.

    Reply
  2. Cotton Rohrscheib says

    April 11, 2008 at 7:38 am

    Just an update on this, Jane was able to help me get this fixed…

    // ********** Send simple email ************

    $email=”[email protected]”;
    $message=”New Registration has been made on your website, please login and retrieve their information, http://www.anurturingtouch.com/cms“;
    $subject=”New Registration”;
    if (mail($email, $subject, $message))
    echo “email was sent”;
    else
    echo “error”;

    //********** Redirect to another page ************
    header(“Location: http://www.anurturingtouch.com/confirmation.php“);
    exit();

    Reply
  3. Nick says

    April 13, 2008 at 6:50 pm

    The problem was because you were exiting the scripts execution with “exit();”, prior to the mail function.

    Reply

Please Drop Your Questions or CommentsCancel reply

Let’s Connect

  • Email
  • Facebook
  • Instagram
  • LinkedIn
  • Twitter

Recent Updates

  • EP:032 – Cotton Rohrscheib & Diana DeHart
  • Challenges & Opportunities Going into 2025
  • Find us at the 2025 Arkansas Women in Agriculture Conference in Hot Springs, Arkansas
  • Be Sure to Checkout FBN’s Farmers First™  Crop Nutrition & Adjuvant Lineup for 2025
  • What we all need in Dark Times…

Blog Categories

  • Blog (419)
  • Entertainment (376)
  • Faith & Family (147)
  • Farm & Business (288)
  • Health & Wellness (33)
  • Marketing & Tech (584)
  • Podcasts (31)
  • Urban Farming (20)
  • Weekend Projects (1)

Listen & Subscribe

Blog Archives

Join the Cotton Club!

 

Content Copyright: 2001-2025
Cotton Rohrscheib | Rohrscheib Capital