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 3233608
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:17:47+00:00 2026-05-17T17:17:47+00:00

Well guys, to ask the question is pretty simple, but myself, I’m having a

  • 0

Well guys, to ask the question is pretty simple, but myself, I’m having a problem on finding the answer, and I need this badly…

The question is:

I have the following function in (donate/index.php)

function submitted_amount()
{
global $db, $user, $auth, $template, $current_dir;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;

    include ($phpbb_root_path . 'includes/functions_user.' . $phpEx);
    include ($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
    include_once ($phpbb_root_path . 'donate/functions_donate.' . $phpEx);

    $submitted_amount = (isset($_POST['submitted_amount'])) ? true : false;

    $sql = 'UPDATE ' . DONATION_TABLE . "
            SET config_value = '" . $submitted_amount . "'
            WHERE config_name = 'submitted_amount'";

    $result = $db->sql_query($sql);

}

page_header($user->lang[‘DONATE_EXPLAIN’], false);

submitted_amount();

$template->set_filenames(array(
‘body’ => ‘donate/index_body.html’)
);

?>

Now the file: (styles/prosilver/template/donate/index_body.html)

It has the following line

< input type=’text’ name=’submitted_amount’ id=’submitted_amount’ value=” size=”25″ tabindex=”1″ maxlength=’9′ class=’inputbox_d’ align=”top”>

< form action='{U_DONATE_CONFIRM}’ method=’post’>

< input type=’submit’ class=”button1″ name=’submit’ value='{L_SUBMIT}’>

If you need more clarifications please tell me. I showed you all possible connections between the HTML and the PHP of my code. The database column is there, so what’s my problem?

  • 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-05-17T17:17:47+00:00Added an answer on May 17, 2026 at 5:17 pm

    first off:

    $submitted_amount = (isset($_POST['submitted_amount'])) ? true : false;
    

    shouldn’t this be the value of submitted_amount? it will only ever be true or false.

    quick fix would be to change true to $_POST['submitted_amount'], however you’ll be leaving yourself wide open to SQL injection unless you add some variable checking somewhere in there.

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

Sidebar

Related Questions

I know very well that this question is ask many time but some how
Ok guys I know this question has been asked before but I am very
I need you guys to finally arrange this issue well in my head. As
This seems like it should be a well known problem, but I haven't been
Hi guys thanks for pay attention to this. Well im trying to replace every
Ok, this may seem like a dupe question, but if you bear with me
Hi guys got a wired problem (well I find it a wired problem :P)
well guys this code trow this exception and I dont know why... exception: Fatal
This is a stupid question, and I know it is, but for some reason
Alright guys, well, here is the thing. I used this wonderful website and found

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.