Jump to content

Adding variable to URL


This topic is 4975 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I'm trying to use the Site Assistant to create a site that allows a user to edit a record. I'd like to have it work in such a way as to have the user receive an email with a link. When they press the link it goes directly to a specific record in FileMaker where they can make edits and then save. It seems the only way to do this is to embed the record number (primary key) into the URL that is passed in the email. Is this even possible?

Thanks!

Scott

Link to comment
Share on other sites

I just posted something that might help you out:

http://fmforums.com/forum/showpost.php?post/367469/

What I'm working on is a basic email subscription page where newsletter recipients would click on the link in their email and it would bring them to their contact record (pulled right from FileMaker via PHP) and they can toggle their subscription settings.

You're right about the '-recid' appearing to be the only way the Site Assistant relies on. Honestly, that's OK by me since we can pull that value in FileMaker using the Get(RecordID) function.

MY main concern is that if that's the ONLY way to find a record, it's open to abuse. Someone could easily change the -recid value to any number, starting at 1, to load page after page of record data.

I have another PHP based solution that pulls dog training classes from our FileMaker Server:

http://66.173.8.234/fmphp/events.php?new_find=Yes&event_category=Puppy%20Kindergarten&item_id=NULL&-skip=0&-max=100

I can pull the source code for you if you wish.

Link to comment
Share on other sites

Thanks so much for the read and reply. Yes, if you don't mind I'd like to see the source code.

It's funny, all I want to do is have a user click a link, have it go to a specific record and allow them to edit, then submit the record.

Jonathan Stark's book on FileMaker and PHP is great, but trying to modify a site assistant-generated page has been unusually arduous. Seems like it shouldn't be that difficult.

Thanks again....

Scott

Link to comment
Share on other sites

I posted the source code in my other thread here and here.

I severely stripped down a lot of unnecessary assistant generated code (mostly CSS stuff) and modified the edit page so that the ONLY thing that is modifiable is the checkbox. If you go back and recreate an entire new create/edit/delete site through the assistant, you should be able to find the code that presents regular text fields for editing and the like.

And if you happen to figure out how to update a timestamp field when the user hits the Save button, let me know. :

Link to comment
Share on other sites

This topic is 4975 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.