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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:23:41+00:00 2026-06-09T18:23:41+00:00

So i am trying to type something in input box which i want to

  • 0

So i am trying to type something in input box which i want to be dynamically stored in a variable. And then there is a hyperlink next to a table of records which will take this variable(.php?S=$inputboxvariable) and go to next php page which will execute a sql statement using this variable’s value.

I do not want for submission , _GET or _POST or even SESSION variable in this.

Please help. I know coding would help but i dont know how, just a basic code would suffice.

Thanks

  • 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-09T18:23:43+00:00Added an answer on June 9, 2026 at 6:23 pm

    Alright I get what your asking for now. The javascript below will make a call from your page to an external script (ajax/myscripthere.php) which will handle the SQL.

    In the php script, we simply handle our SQL like we normally would if this was not an AJAX call.

    Please accept answer if this is correct to your expectations 🙂

    javascript:

    <script>
        var xmlHttpReq = false;
    
        // Set ID Equal to your input box ID
        input_box_value = document.getElementById("inputboxvariable").value;
    
        if(window.XMLHttpRequest) {
            self.xmlHttpReq = new XMLHttpRequest();
        }
        else if(window.ActiveXObject) {
            self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
        }
    
        // Set filename equal to your PHP script
        self.xmlHttpReq.open('POST', "ajax/myscripthere.php", true);
    
        self.xmlHttpReq.onreadystatechange = function()
        {
            if(self.xmlHttpReq.readyState == 4)
            {
                // Update is complete
            }
        };
    
        self.xmlHttpReq.send("value="+input_box_value);
    </script>
    

    PHP:

    <?php
    if(isset($_POST['value']))
    {
        $conn = new mysqli("host", "username", "password", "db_name")
                     or die ('Error: '.mysqli_connect__error());
    
        // Make Correct SQL Query (i dont know your DB)
        $query = "UPDATE table_name SET col=".$_POST['value']." WHERE xxxxxx;";
    
        $result = @$conn->query($query);
    
        $conn->close();
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to style an input-box rendered using jEditable . I want to
I'm trying to build something like the C# type initalizer dynamically: MyClass class =
Im trying set the single table inheritance model type in a form. So i
What i'm trying to do is get Type of enum which is nested in
I am trying to alert something whenever a drop-down box changes and whenever something
I'm trying to type-check the commands I want to send to a server from
What I am trying to do is following: I have an input type button
I'm trying to dynamically load an external .js file (according to an input I
I am trying to type FValue in a cell. Openoffice changes it to Fvalue
I am trying to understand type members in Scala. I wrote a simple example

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.