dansasu11
dansasu11

Reputation: 913

Provide an embed code of a section of a page for users to use

I have a ticketing site ( eventtickx.com...click buy tickets on the event ghana @ 55(you will see the layout)). I want to generate embed code for event managers for each event they post. I want an embed code for the tickets available section only which has the information ( ticket assignment, quantity and price). so basically this is what I am trying to do ..generate an embed code for tickets available section of a page for each event to event manager that created the event. how do I go about doing this? Thanks for your help.

Upvotes: 0

Views: 91

Answers (1)

Jay
Jay

Reputation: 2141

I'm not sure if I fully understand you, but I think you would like to provide a snippet like <iframe src="http://eventtickx.com/embed_event.php?eid=123"></iframe> to enable people to embed a little info box for a specific event on their site (like you can do with YouTube videos)?

What you would need is a script (e.g. embed_event.php) that provides the iframe content and takes one GET parameter. This script would do the necesserary queries (getting event name, description, available tickets etc. from the database) and display them as a complete HTML page (similar to what you are doing in event_details.php). The GET param would be typically the event ID that you could use to query your database.

The embed code could be generated as soon as you know the event ID (usually after you have inserted the dataset into you database when creating the event).

Upvotes: 1

Related Questions