stuart7398 Posted April 10, 2008 Share Posted April 10, 2008 Hi. I allow users to create a profile of themselves. However, before going online they must pay. So, my user has a profile, a couple of days later they maybe add a picture. Now they want their profile to go online. How do I authorize their profile to go online, where do I start with this? Any suggestions / tutorials appreciated. Thanks, Stuart. Quote Link to comment Share on other sites More sharing options...
poleposters Posted April 10, 2008 Share Posted April 10, 2008 Hi Stuart. This is a tricky question since I don't know how far you have gotten along. Firstly you need to set up paypal or another payment method and either integrate it with your site(tricky) or manage your payments manually. ie paypal sends you a confirmation email and you manipulate your database manually. The basic idea is to set up a column in your database called paid_profile or whatever you'd like to call it. This can be set for example to '0' for an unpaid profile and '1' for a paid profile. That way when you come to display the profiles on your page, you can include a condition that only displays profiles where paid_profile='1' or paid_profile>0. If you have the code that displays the profiles or lists the profiles, post it and I can explain it more thoroughly. Quote Link to comment Share on other sites More sharing options...
stuart7398 Posted April 10, 2008 Author Share Posted April 10, 2008 Hi. Thanks. Manual sounds better. This is the code displaying images linking to a detailed profile. <code> $data = mysql_query("SELECT * FROM `members` ORDER BY `join_date` DESC LIMIT 10") OR DIE (mysql_error()); while($info = mysql_fetch_array($data)) { Print "<p><a href='../member_profile.php?id=".$info['member_id']."'>".$info['name'] ." <img src=/pages/images/".$info ." width='80px' border='0'/><i>".$info['location']."</i></a></p>"; </code> Thanks, Stuart. Quote Link to comment Share on other sites More sharing options...
poleposters Posted April 10, 2008 Share Posted April 10, 2008 Easy. Set up a column called paid_listing in your members table.'1'=paid and then modify your query <code> $data = mysql_query("SELECT * FROM `members` WHERE paid_listing=1 ORDER BY `join_date` DESC LIMIT 10") OR DIE (mysql_error()); while($info = mysql_fetch_array($data)) { Print "<p><a href='../member_profile.php?id=".$info['member_id']."'>".$info['name'] ." <img src=/pages/images/".$info ." width='80px' border='0'/>".$info['location']."[/url]</p>"; </code> Quote Link to comment Share on other sites More sharing options...
stuart7398 Posted April 10, 2008 Author Share Posted April 10, 2008 Thanks for that. Stu. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.