Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7931313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:40:53+00:00 2026-06-03T20:40:53+00:00

This is what I’m trying to do : I have a CMS website, in

  • 0

This is what I’m trying to do :

I have a CMS website, in my admin panel i can add some packages users can buy from my website. So in my Choose.php page, users can select which package the want to buy. And of course the price is set for each package not by them, but by me.

If they click on a package, the page sends the data to another page like this :

$form  = '<form action="/buy.php?'product_name='.$name.'&product_id='.$product_id.'&price='.$ammount.'" method="post" target="_parent" ><input type="submit"     style="background-image:url(images/p.png);height: 55px;width: 118px;" value=""/></form>';

So users only click on predefined packages. If a user is some how expert in PHP, or even in scripting, he can easily change the url like :

product_name=MYPRODUCT&product_id=1&price=1000$

to something like this :

product_name=MYPRODUCT&product_id=1&price=10$

this means, they can buy the same package for 10& instead of 1000$.

So i need to ecrypt this url which is gernerated for each package separately, to something like this :

$form  = '<form action="/buy.php?MVNnaPgxpQizqwv7YElroi5E" method="post" target="_parent" ><input type="submit"     style="background-image:url(images/p.png);height: 55px;width: 118px;" value=""/></form>';

then in my Buy.php page, this encrypted string, deycrypts.

But the problem is with the decryption part, because when I deycrypt it, it says it’s an Array ( because i use $_GET to get the url ).

And when I use array deycription methods, i get an error in my first page, which it says the value i’m encrypting is a String not an Array. ( Remember : product_name=MYPRODUCT&product_id=1&price=1000$           which is a string. )

So how can i encrypt a string in one page, send it through url ( with $_POST ) then in the Buy.php page, use the $_GET and deycrypt it to arrays.

Sorry if it becomes a long post. And I need an encryption/decryption code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:40:55+00:00Added an answer on June 3, 2026 at 8:40 pm

    For security reasons I would advise you not to forward any sensitive data through GET/POST parameters!
    Even if they are encrypted, there might be a way for attackers to encrypt it and bring a lot of damage to you.

    You should store the price of the product in a database. When the user selects a product you forward to sth. like

    $form = ‘<form action=”/buy.php?id=34″>’

    And in buy.php you then retrieve the price and additional informations from the database.

    My advise is to read or at least have a look at PHP Security Guide

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have so far: type u = {str : string} //some
Does anyone know how can I replace this 2 symbol below from the string
I have some data like this: 1 2 3 4 5 9 2 6
This somehow simple task is not so simple. I can get the number of
This has been a rather problematic issue on numerous occasions. We have alot of
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.