This topic is locked

Events Form

8/12/2007 11:58:59 AM
PHPRunner General questions
M
magikroom author

OK, I've set up php runner to basically store events. I currently use an email form that people input their details and it comes through to me as a message, I then add it to the phprunner event's thing i've set up maunually. Is there any way to create a custom form that will automatically send the details from the person filling in the form, to the access db that is behind phprunner

J
Jane 8/13/2007

Hi,
I'm not sure that I understand you correctly. When you fill form on the add page and save, all data is written to the database.

M
magikroom author 8/13/2007

Hi,

I'm not sure that I understand you correctly. When you fill form on the add page and save, all data is written to the database.


Thanks...Yeah I know that you can use the add page, but I want to a seperate form that the general public can complete, without the need to login. I'm currently using a form on my website that comes in via email and then I copy the details manually into phprunner DB (Access). If the public used the 'add' page then they would need to login...and have usernam and password. The phprunner tool is just for our companies benefit.
To see the form, use the link below:
Form
I'm currently using access, but will move over to MySql once i've got my head around it. I also want to be able to limit the amount of records that the DB will hold...for instance, we set up an event that will hold 150 people, I want to be able to limit the db to only store this amount and have a count down on the Form itself...something like "there are currently 100 places left out of 150"...by somehow querying the db.
I realise this may be a lot to ask...but the ability to use an external form that connects to the db is paramount...hope you can help.

J
Jane 8/14/2007

Hi,
to save entered values in any place (database, file, etc) use Before record added event on the Events tab. All entered values are stored in the $values array in this event.
Also you can use Before record added event to limit number of records.

Here is a sample:

global $conn;

$str = "select max(FieldID) as number_of_records from TableName";

$rs = db_query($str,$conn);

$data = db_fetch_array($rs);

if ($data["number_of_records"]>100)

return false;

else

return true;