Reload Form - MySQL error

Hi there,

everything works fine on my form (2 pages for form - event & event details). On a button the form opens in a blank window. When I shut down this window and press button for form again I get error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘) AND (event_details_id = 0)’ at line 1
SELECT event_details_id, event_id, application_link, application_doc, venue_name, venue_street, venue_streetnumber, venue_localityname, venue_town, venue_postcode, venue_state, venue_country, organizer_name, organizer_country, organizer_email, organizer_url, organizer_contact_title, organizer_contact_lastname, organizer_contact_firstname, organizer_contact_landline, organizer_contact_mobile, organizer_contact_email, host_name, host_country, host_email, host_url, host_contact_title, host_contact_lastname, host_contact_firstname, host_contact_landline, host_contact_mobile, host_contact_email, emergency_landline1, emergency_landline2, emergency_mobile1, emergency_mobile2, additional_information from cms_event_details WHERE (event_id =) AND (event_details_id = 0)

When I reload page where I have the button that redirects to first part of form, everything works fine again. I only get this error when I press the button a second time without reloading the page where I have the redirecting button.

I added a WHERE statement on first part of form that says WHERE event_id = ‘-1’ (key) so he starts with an empty form…event_id then gets an autoincrement and part 2 of form also gets this event_id passed on by using a glob var [var_event_id] to the field event_id. Second part of form has autoincrement for event_details_id (key).

Can anybody give me a hint how to deal with this? I tried to clean glob var when pressing button to go to the first part of form, but this does not work.

How can I load a clean form when I press the button to go to this form? Thank you…

Re: Reload Form - MySQL error

Try using a session variable and see if this helps.
$_SESSION[‘myvar’];

Regards,
Scott.

Re: Reload Form - MySQL error

Thank you…I checked at Glob Var on second form my “Session” to YES, but still not working…I always need to reload my first page that redirects to first part of my form…any other way to get a clean form?