RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Problems / When creating a new event the Event ID is not sent to email notification
Posted:  04 Dec 2014 20:54
I am trying to send email notification when a new event (that needs approval) is created.

Problem : the eid or $eid or Event ID is not sent to the email.

It's sent only if it's saved FIRST, and then i modify the event.

Can you explain how to use this
event.php (line 386)    :      $eid = mysql_insert_id(); //set id to new event
this information is not sent to the email notification for NEW EVENT
Posted:  17 Dec 2014 12:48
Hi there,

When an event is created in the MySQL database, the database assigns an event ID to the event (AUTO_INCREMENT column).
the PHP function mysql_insert_id() retrieves the ID generated by the previous query (INSERT).

So indeed, you first need to save the event, so that an event ID is assigned to the new event and only thereafter you can retrieve this ID from the database and use it to send an email notification for this event.

Roel