Copy link to clipboard
Copied
Hello! I'm slowly learning my way through PHP/MySQL and have been trying to figure out a solution for a website I'm working on. Basically, a person can search through a database of information (in this case, musical instruments that are for sale) but in order to contact the seller, they need to have a paid subscription. I've been able to set up my dynamic tables successfully for the different categories I have, but need to know how to make it so that if a person does want to contact the seller, there's another link to take them to that information (I know how to password protect pages, but the "link" to that information is what I'm trying to figure out). Any guidance would be much appreciated!
I'd also like for a browser to be able to to click a link for any uploaded images (preferably have it pop up instead of having an image take up space in the table). Any suggestions? Sellers are able to upload photos to the database.
Thanks!
The idea behind this is that the link passes the seller's ID in the querystring to a dynamic page that reads the ID and uses that in a SQL query WHERE clause. You can try using the Master/Detail server behavior for this, or code it yourself. This will allow you to drill down from the instrument list to the seller contact info. Of course you do need to apply the Access Restrictoin behavior to the seller page. You could get fancy and dynamically change the link so that for non registered users it
...Copy link to clipboard
Copied
The idea behind this is that the link passes the seller's ID in the querystring to a dynamic page that reads the ID and uses that in a SQL query WHERE clause. You can try using the Master/Detail server behavior for this, or code it yourself. This will allow you to drill down from the instrument list to the seller contact info. Of course you do need to apply the Access Restrictoin behavior to the seller page. You could get fancy and dynamically change the link so that for non registered users it would say "Paid Members Only" and clicking would bring them to the registration area.
>I'd also like for a browser to be able to to click a link for any uploaded
>images (preferably have it pop up instead of having an image take up s
>pace in the table). Any suggestions? Sellers are able to upload photos to the database.
Storing images or any binary data in a database is no longer a suggested method, as it can lead to poor performance problems. The preferred method is to upload the file to the server file system, and then store a link to that file in the database. That solves your other problem too - it makes it easy to provide a link for a popup window to display the image.
Copy link to clipboard
Copied
Thank you so much for your help. The Master/Detail server worked like a charm!! I haven't tried the photo aspect yet, but I'm happy to have something working correctly. Thanks again...
Copy link to clipboard
Copied
You're welcome.
Copy link to clipboard
Copied
I was wondering if I could ask you another question concerning my site. Like I mentioned before, users need to have a paid subscription to view a seller's information. These subscriptions can run from 1 day, 3 days, 1 week, up to 1 year. How do I set this "time limit" for an individual user? I'm assuming it's wrapped up in the access key part of a SQL? Also, a person can be registered user and not have a subscription so how does a user update their original record when updating their subscription?
I hope this is clear (as mud I'm sure!)
Thanks again.