I hardly know anything about PHP, scripts and so on. I only know how to create static websites. I would like to create an online magazine service with a few "freebie" pages and then have a membership section. This requires seting up a user account and then payment via credit card. From what I've researched this is called content management. However, I am not down with all the correct lingo, so I am going in circles. I know you can use paypal and all that but, can it be tied in with the user account-example: You would sign up for a month, and after credit card payment you immediately can surf the pages. Then after a subscription is up, the user cannot log on? Any help would be greatly appreciated.

Thanks in advance!

Dani AI

Generated

— practical, no-fluff plan to get a membership area working with credit‑card payments using PHP.

Start with the flow, keep card handling off your server, and make access decisions data-driven:

  • User registers (email, hashed password) and is created in users.
  • User chooses a plan and goes to a hosted/tokenized checkout (the payment provider returns a customer/token).
  • On successful payment record a subscription and set subscription_expires_at (or create a recurring subscription record).
  • Allow immediate access after you confirm the charge; revoke access when subscription_expires_at passes (checked at login and on protected pages).
  • Rely on server-side notifications (webhooks) from your gateway to update subscriptions for recurring payments, refunds, or charge failures.

Minimal schema + examples (adapt to your app):

CREATE TABLE users (
  id INT PRIMARY KEY AUTO_INCREMENT,
  email VARCHAR(255) UNIQUE NOT NULL,
  password_hash VARCHAR(255) NOT NULL,
  subscription_expires_at DATETIME NULL
);

CREATE TABLE payments (
  id INT PRIMARY KEY AUTO_INCREMENT,
  user_id INT NOT NULL,
  gateway_charge_id VARCHAR(255),
  amount DECIMAL(8,2),
  status VARCHAR(50),
  created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);

Login check (concept):

if (new DateTime() < new DateTime($user['subscription_expires_at'])) {
  $_SESSION['user_id'] = $user['id']; // allow
} else {
  header('Location: /renew.php'); exit; // deny
}

Key cautions and tips: never store raw card data (use hosted checkout or tokenization), always use HTTPS, verify webhook signatures, use password_hash()/password_verify() for passwords, log payment events for audits, and test thoroughly in the gateway’s sandbox. Handle edge cases—proration on upgrades, cancellations, refunds—and provide an admin override for disputes.

’s point about learning server-side tech is relevant: start with small examples and a sandbox gateway. ’s offer shows you can outsource gateway integration if you prefer a quicker path.

Yeah creating static pages is so boring I think that you should learn ASP or PhP
I also love to create a search web page towards the classifieds or matrimonial which is now a days are booming web sites.

Stuartdenley
WideCircles

We have examples of payment processing in PHP at (using our gateway).

We can help you with setup/integration if interested as well.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.