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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:16:42+00:00 2026-06-09T16:16:42+00:00

I am working on an php file, winch shows an table with values of

  • 0

I am working on an php file, winch shows an table with values of the database. every row has an imagebutton at the end, which should change the status, displayed with an image.
so I think short function of it all must be, on click go to script go to php or jQuery?
the buttons also have to give the id of the user to the next script or function, or os there a better way?

here is my basic approach, with no functionality, for the moment

in index.php

include("function.php");

while ($row_user = mysql_fetch_assoc($result_user)) {
            
    $sqle = mysql_query("
                    SELECT COUNT(*) FROM 
                       places2user                                 
                    WHERE
                       user = '".mysql_real_escape_string($row_user['ID'])."'
             
                    ");
            $res23 = mysql_fetch_array($sqle);

echo <table>
  echo <tr>
    echo "<td>".$row_user['ID']." </td><td><input type=\"image\" src=\"images/".htmlentities($row_user['receive'], ENT_QUOTES)."\" id=\"status\" name=\"status\" ></td>
  echo </tr>
echo </table>
}

there is also a function.php, with a changestatus($id) function, which updates the database values, but I think, this is not the right way to code this.

  • 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-09T16:16:44+00:00Added an answer on June 9, 2026 at 4:16 pm

    While programming, don’t rely on javascript only. I always create form using just html and css, make sure it works, and than add fancy stuff with jQuery or so. This way you know the form will also work without javascript (great for users without it).

    But to come to your question:

    if you use this, it should do what you want:

    <?php echo "<form action='?' method='post'>
    <table>
    <tr>
    <td>".$row_user['ID']." </td>
    <td><input type='hidden' name='userId' value='".$row_user['ID']."'/>
       <input type=\"image\" src=\"images/".htmlentities($row_user['receive'], ENT_QUOTES)."\" id=\"status\" name=\"status\" ></td>
      </tr>
    </table></form>";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

PHP CLI has suddently stopped working on the server. When running any php file
I am working on activity which request one php file on server & this
When I am working on a PHP file for example the default filetype is
The php file I am working on is for returning members. The preceding htm
I have some issues with a PHP file that is not working properly. The
I have an ajax.php file in my Wordpress themes folder, and this was working
I am working for a PHP project that retrieves file meta information . All
I use mercurial for php projects and my .hgignore file is not working. It's
I am working on code re-factoring of configuration file loading part in PHP. Earlier
I am working on a command line php file, and I tried to use

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.