Jump to content

[SOLVED] authorize user


stuart7398

Recommended Posts

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. 

 

Link to comment
Share on other sites

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>

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.