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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:08:10+00:00 2026-05-26T05:08:10+00:00

i write a command, or i fill up parameter value from user input field.

  • 0

i write a command, or i fill up parameter value from user input field. click the button, send this command to php and send resultant value back to html to display.
for example. on html page :

select ___ from ____, 

two available input field i fill up with “tablenameone” and “valueone”. then, result will be printed on html text field on the same page.

what i do know is those value can be sent(perhaps) as in such format

$('input[name="talbename"]') 
$('input[name="value"]')
example.com?tablename=tablenameone&value=valueone

and from php side i use

 $sql="SELECT '$_GET['value']' FROM '$_GET['tablename']';

what i dont know is that….how exactly should i perform this in a click function? its for sure using ajax. but how can i produce example.com?tablename=tablenameone&value=valueone
and where should i put $(‘input[name=”value”]’)

thanks in advance 😀

  • 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-26T05:08:10+00:00Added an answer on May 26, 2026 at 5:08 am

    Seeming as though noone has actually answered the question (although they are all good points, I will assume there is a reason for you doing this), I will answer:

    $('form[name=formname]').submit(function(e){
        e.preventDefault;
        var tablename = $('input[name="tablename"]').val();
        var value = $('input[name="value"]').val();
        $.get("example.php?tablename="+tablename+"&value="+value, function(data){
             $('body div').text(data);
        })
    });
    

    PHP:

    $sql=mysql_query("SELECT '$_GET['value']' FROM '$_GET['tablename']'")or die(mysql_error());
    $sqlOutput = mysql_fetch_array($sql);
    echo "<pre>";
    print_r($sqlOutput);
    echo "</pre>";
    

    Obviously replace formname with your form name, body div with the name of the element you want the output to go in and all other identifiers replaced where seen fit. Then change the output in the PHP to suit your needs.

    Again, do bear in mind the posts regarding SQLi, because you have yourself a very serious problem there.

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

Sidebar

Related Questions

irb can write command history to a file, but it only does this when
Linux. Tcp socket. When does a send()/write() command fail? Does it return -1 only
How to write command in bash ? ( for user test if program return
I want to write a command that specifies the word under the cursor in
I want to write a command line program to add a contact to GoogleMail.
Since I write a command line program to check cpp files, and it need
I would like to write a command line tool that passes some formatted text
Let's take example of a command example-command. I open terminal I write example-command in
Hey, I am trying to write a command to print todays date on the
I need to write a simple command-line application in Java. It would be nice

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.